[BlueOnyx:01369] Re: mysql dump and restore

Greg Kuhnert greg.kuhnert at theanchoragesylvania.com
Fri Jun 5 17:31:40 -05 2009


Tony C. Loosle wrote:
>  
> How can I restore mysql users from 3 servers?
>  
> I have to bq servers and one bx server.   I have exported all of the 
> sites on all servers and want to put them onto one new bx server.   
> Last time the raqbackup.sh wrote over the exisiting mysql users.   Is 
> there a way to avoid this?
Try something like...

mysql --password=mypass --batch --skip-column-names --execute="SHOW 
DATABASES" | grep -v "mysql" | xargs mysqldump --password=mypass 
--databases > dump.sql

This will export all databases, excluding the "mysql" database. You will 
of course need to manually migrate the user details from your 3 servers.

Regards,
Greg.



More information about the Blueonyx mailing list