MySQL Forums
Forum List  »  Newbie

Re: Migrating MySql from Debian to Windows
Posted by: Barry Galbraith
Date: June 21, 2014 06:08PM

> How do I get it over to MYSQL in Windows?

Transport the mysqlbackup.sql file from the linux box to the windows machine, probably with a USB stick.
I'll assume the file on the usb stick is seen as d:\mysqlbackup.sql
Then, on the windows machine, open a command line (DOS prompt).

For thsi to work, the MySQL version on the Windows box MUST be the same (V5.1, or V5.5 etc) as on the linux box.
Loading the backup will overwrite the mysql database which will have the effect of changing the root password, as well as provide all the other mysql users that wre on the linux box.

No load the backup with this.
c:\>mysql -uroot -p < d:/mysqlbackup.sql

Notice the / rather than \ in the path to the file? \ is escape character to mysql, / is path separator. Windows will take either.

Your database(s) should now be loaded, and to connect with mysql, you will need the Windows root password until you either restart mysql server, or use FLUSH PRIVILEGES command to make mysql re-read the privileges table. Then you will need the old Linux root password.

Good luck,
Barry.

Options: ReplyQuote


Subject
Written By
Posted
Re: Migrating MySql from Debian to Windows
June 21, 2014 06:08PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.