Moving a MySQL installation?

Don Levey lug at the-leveys.us
Fri Apr 13 19:57:05 EDT 2007


Mark Richards wrote:

> 
> My preference would be your option 2 which can be done in a single 
> statement to export each database and a single statement to import each 
> database:
> 
> mysqldump -u USER -p  DATABASE > wholedb.sql
> 
>     You will be prompted to enter the password for USER
> 
> then to restore into a new mysql database
> 
> mysql -u USER -p DATABASE < wholedb.sql
> 
>     You'll be prompted to enter the password for USER.
> 
> Replace USER and DATABASE with appropriate names.
> 
> Before discarding the source MySQL installation I'd be certain that 
> everything is intact on the new one.
> 
> Also, make certain your fresh MySQL installation has at least been 
> initialized before you try to import.
> 
> /m

Ah, OK - that makes sense, and I *am* upgrading the version so this is 
probably safer.  One more idiot question: how to I generate a list of 
databases?  The current machine has been around for quite a while 
(started as Red Hat 6.1) so I'm not completely sure what I've got in 
there now...
  -Don

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




More information about the Discuss mailing list