You are hereBlogs / ari's blog / Moving MySQL Database from Windows to Ubuntu Linux without mysqldump
Moving MySQL Database from Windows to Ubuntu Linux without mysqldump
This may work with other distros too.
The question is can it be done. My reply is yes… terms and condition applies.
Terms and conditions :
1. The mySQL DBMS for both the server must use same version.
2. Database only uses MyISAM tables, strictly no INNODB please.
3. Refer to line 1 and 2 ![]()
Workflow :
1. Stop the mySQL service on the windows server. Make sure that the mySQL service is really dead.
2. Go to the mysql database data path, Windows usually will be in “C:\MySQL\Data” or "c:\xampp\mysql\data".
3. Zip the directory/folder which shares the same name as the database that you are about to copy over.
4. After that, copy the file over to the Linux server. *use WinSCP at your windows machine if you have SSH installed in your Linux machine.
5. From the linux machine, stop the mySQL service. Yeah you need to make sure it is really dead.
6. Unzip the file and place it into the data path of mysql, my server database location it is at “/var/lib/mysql/" .
7. Change the ownership ("chown mysql:mysql -R") for the newly extract directory folder to mysql . "-R" will update proper files or folders permission too.
8. Re-initiate the mySQL service at the linux server.
9. Use the mysql shell to test :
shell > mysql -uroot -p[password]
mySQL shell > use [dbname]
database changed
mySQL Shell > select * from [table_name];
10. Should step 9 gives you the actual data, give your self a pat on your shoulder. Task is done.
(http://www.it-idiot.net/2008/01/moving-mysql-database-from-windows-to-li...)

Post new comment