Unix Technical Forum

Re: Moving Database from PC to Apple

This is a discussion on Re: Moving Database from PC to Apple within the MySQL General forum forums, part of the MySQL category; --> Thanks. Is this something I can do through phpMyAdmin? I'm not used to working with MySQL directly and don't ...


Go Back   Unix Technical Forum > Database Server Software > MySQL > MySQL General forum

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 10:28 PM
David Blomstrom
 
Posts: n/a
Default Re: Moving Database from PC to Apple

Thanks. Is this something I can do through phpMyAdmin? I'm not used to working with MySQL directly and don't understand exactly what this command means:
shell> mysqldump [options] --all-databasesDoes "shell" mean I have to be working in some sort of command line program?

Also, if I can't figure this out and have to resort to creating new databases, should I just ignore the Collation feature, presumably letting it set a default setting, or should I enter a particular value?

Thanks.

----- Original Message----
From: mos <mos99@fastmail.fm>
To: mysql@lists.mysql.com
Sent: Saturday, October 7, 2006 2:26:19 PM
Subject: Re: Moving Database from PC to Apple

At 04:00 PM 10/7/2006, you wrote:
>I recently purchased a MacBook Pro laptop and hired someone to help me set
>up Apache, PHP and MySQL on it. Now I want to import my database tables
>from my PC. So my main question is this: Is there a quick, simple of
>importing an entire database? If not, I figured I'd simply export each
>database table as an SQL file on my PC, then copy all the SQL files to my
>laptop's desktop and import them through phpMyAdmin one by one. Also, when
>I create a newdatabase on my Mac, what should I choose for Collation - or
>should I just leave it alone (presumably the default setting)? The
>following default settings are already registered: Language: English
>(en_utf_8) MySQLConnection Collation: utf8_general_ci Thanks.


David,
Try MySQLDump which is set up to do just this.
http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html

Mike

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=d...trom@yahoo.com








Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 10:28 PM
Douglas Sims
 
Posts: n/a
Default Re: Moving Database from PC to Apple

Hi David

mysqldump is a command-line program which you can run through the
terminal window. The "Terminal" application is in the "Utilities"
directory under the "Applications" directory. The unix command-line
interface is amazingly useful; even though it may seem a bit
intimidating at first, it is well worth getting used to. You will
probably want to drag the Terminal application down to the Dock so
you won't have to dig around for it every time. (Or you can just
open the Spotlight window with Command-Space and then type "Terminal")

You can also do the same thing with a gui tool, the MySQL
administrator. There are three programs in this suite and they are
all very nice (the newest one, the MySQL workbench, still crashes a
bit but I'm sure that will improve.) You can download the gui tools
here: http://dev.mysql.com/downloads/gui-tools/5.0.html and then from
the MySQL Administrator program, choose "Backup".

Good luck. I use a MacBook Pro for MySQL work also (mostly
developing things that will run on a linux server) and I have been
very pleased with it.

Douglas Sims
Doug@Apley.com



On Oct 7, 2006, at 5:01 PM, David Blomstrom wrote:

> Thanks. Is this something I can do through phpMyAdmin? I'm not used
> to working with MySQL directly and don't understand exactly what
> this command means:
> shell> mysqldump [options] --all-databasesDoes "shell" mean I have
> to be working in some sort of command line program?
>
> Also, if I can't figure this out and have to resort to creating new
> databases, should I just ignore the Collation feature, presumably
> letting it set a default setting, or should I enter a particular
> value?
>
> Thanks.
>
> ----- Original Message ----
> From: mos <mos99@fastmail.fm>
> To: mysql@lists.mysql.com
> Sent: Saturday, October 7, 2006 2:26:19 PM
> Subject: Re: Moving Database from PC to Apple
>
> At 04:00 PM 10/7/2006, you wrote:
>> I recently purchased a MacBook Pro laptop and hired someone to
>> help me set
>> up Apache, PHP and MySQL on it. Now I want to import my database
>> tables
>> from my PC. So my main question is this: Is there a quick, simple of
>> importing an entire database? If not, I figured I'd simply export
>> each
>> database table as an SQL file on my PC, then copy all the SQL
>> files to my
>> laptop's desktop and import them through phpMyAdmin one by one.
>> Also, when
>> I create a new database on my Mac, what should I choose for
>> Collation - or
>> should I just leave it alone (presumably the default setting)? The
>> following default settings are already registered: Language: English
>> (en_utf_8) MySQL Connection Collation: utf8_general_ci Thanks.

>
> David,
> Try MySQLDump which is set up to do just this.
> http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html
>
> Mike
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?
> unsub=david_blomstrom@yahoo.com
>
>
>
>
>
>
>


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-27-2008, 10:28 PM
Chris Sansom
 
Posts: n/a
Default Re: Moving Database from PC to Apple

At 15:01 -0700 7/10/06, David Blomstrom wrote:
>Thanks. Is this something I can do through phpMyAdmin?


Yes! Easy:

First, create the database - just the database, no tables or anything
- on the Mac.

Next, go to the database on the PC in phpMyAdmin and without
selecting a table in the sidebar, click the Export tab. In the
'export as' part of the page (which varies wildly between phpMyAdmin
versions), SQL is probably selected as the default. If so, leave it;
if not, select it. Also make sure both Structure and Data are
selected in the 'what to export' part. Then click the Go button.

This will display all your database as SQL commands in text format.
Select All, copy it into a text file and save it. Warning: in some
older versions of phpMyAdmin, you'll get a line saying something like
'Database xxx running on yyy' at the top, as an html <h1>, above the
comment lines starting with #. This line will be included in the
'select all', so you'll have to delete it before you import... which
comes next:

Having transferred the text file to your Mac, go into phpMyAdmin, to
the new database you have created, and click SQL among the tabs along
the top. If there's anything in the <textarea> that appears, delete
it, then copy and paste the entire contents of the text file into
there (tip: if you get hold of the OmniWeb browser for Mac OS X, you
can open a <textarea> into a nice big editing window, which will make
it easier to see what you're doing). Click Go and, to quote the
immortal Mr Jobs, 'Boom! You're done.'

--
Cheers... Chris
Highway 57 Web Development -- http://highway57.co.uk/

Outside of the killings, Washington has one of the
lowest crime rates in the country.
-- Mayor Marion Barry, Washington, DC
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:29 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com