View Single Post
Old 10-02-2002, 05:31 AM  
HQ
Confirmed User
 
Join Date: Jan 2001
Posts: 3,539
Quote:
Originally posted by XXXManager
Hey HQ.
Its that simple...
1. Shutdown the MySQL server (on both machine). [mysqladmin shutdown]
2. Copy the DB files of the specific Databases/Tables you want to copy to the other server.
3. start the MySQL server again.

Only reservation - Not working on INNODB Tables (for that you will need either to alter the table type or copy it to a duplicate table of type INNODB or do a dump) - but im not sure you are using this.

Yes, I think I will shutdwon mysql, just in case. Then just copy the database files found in /var/lib/mysql/ to /var/lib/mysql/ of the new server? To be sure, in /var/lib/mysql/ in my old server, I see a bunch of directories, wach directory being the name of the database i have. There are also a few .err and .pid files that appear to be useless. Is this true? I also see a mysql.sock file. What is that? Once I go inside the directories of the databases in question, I see .MYD, .MYI, and .frm files named after each of the tables in the databases. Does all this sound proper? Do I just have to copy the directories of the databases I have to copy over and that's it? Or do I have to be concerned with these other files?
HQ is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote