I want to move database from MySQL server version 5.0.77 to 5.0.85 by copy database files between the servers
(shut down mysqld and copy the .frm, .myd, and .myi files from one database folder to another)
Many people tell me that I need to have same MySQL server version.
But I dont know how to upgrade MySQL server to specific version.
Thanks in advance.
|
| |||||||
feedback
|
migrated from stackoverflow.com Dec 25 '09 at 16:21
This question came from our site for professional and enthusiast programmers.
|
That is basically what you can do shutdown mysql on the source server and destination server, tar up the mysql data directory, rename the data directory on the destination server, then copy the tarball, extra and then start up the server. However, this assumes that you are upgrading to a minor version (like what you are doing). If you upgrading to a major version (i.e. from 4 to 5 or 5.5), it is likely a different story. | |||||||
feedback
|
|
By copying those files you'll only move MyISAM tables but not InnoDB ones. Better way is to use mysqldump.
and then to import on new database
This method is version independent and you don't have to worry about loosing any data. As for upgrade it depends how did you install your current MySQL. You could try running the following command:
or if you compiled it from source then you have to download a new version and recompile it. | |||
|
feedback
|
|
The safest way is a dump and load. i.e. Dump the databases from the source machine to sql/text files and then import them at the destination. | |||
|
feedback
|