On Thu, 2007-04-26 at 15:03 -0700, kashani wrote:
> Michael Sullivan wrote:
> > I'm currently in the process of migrating databases to a new box.  One
> > of my users has two databases that he needs access to.  Is there a way
> > (through the mysql terminal interface) to find out what passwords he
> > uses to access these two databases?  This will save me the trouble of
> > finding him.  (Most of my users access remotely).  I have root
> > privileges.  Thank you for your help.
> 
> Why bother? User accounts are stored in the db. Just move the whole thing.
> 
> /etc/inti.d/mysql stop
> rsync -av --delete /var/lib/mysql/ newbox01:/var/lib/mysql/
> 
And this method will preserve all granted permissions with their
passwords?  That would be great!
> ssh newbox01
> /etc/init.d/mysql start
> 
>       This is can be slightly more complicated if you are changing db 
> versions and/or have vastly different options in the respective my.conf 
> files.
> 
> Or you can dump the mysql table and just copy the sql lines that you 
> care about if you're moving databases individually.
> 
> mysqldump -u root -p --skip-opt --databases mysql > mysql-db-20070436.sql
> 
> Then cut and paste any access lines from db and user into the new db.

How do I get those?
> 
>       Additionally you can get slick and replicate from the old box to the 
> new box. Then as you migrate individual database users over to the new 
> server you can stop replication on a per db basis. I can go through this 
> option if you're interested. I've done a number of Mysql 
> upgrade/migrations this way and it's easier than it might appear.
> 
> kashani

-- 
[EMAIL PROTECTED] mailing list

Reply via email to