View Single Post
Old 09-21-2006, 10:24 PM  
fatdicksimon
Confirmed User
 
Join Date: Feb 2006
Posts: 226
if you have root access, you can navigate to the mysql data directory and copy the actual data files. the data directory depends on your linux distribution and mysql config, but it is usually /var/lib/mysql.

when you navigate to that directory, and look at the directory listing, you will notice that all of the directories have the same names as your mysql databases. within these directories there are .frm, .MYD, and .MYI files. these are the actual mysql data files, and these three files together actually make up the content of each mysql table.

download the complete folders for all of the databases that you are trying to restore on the new server.

now, on your new server, manually create the databases from the command line or browser interface. next, navigate to the mysql data directory (like i said it will probably be /var/lib/mysql/) and you'll notice that folders have been created with the database names. upload the .frm, .MYI, and .MYD files for each respective database. now the important part: make sure that these files are owned by the mysql user or else they won't be read. you can do this by issuing the following command within the directory:

chown mysql:mysql *

after you do that you should be set with your databases completely restored.

hope that helps. i had to do it a while ago and it was relatively painless.
__________________
icq: 199791893
holler at me

Last edited by fatdicksimon; 09-21-2006 at 10:26 PM.. Reason: typo
fatdicksimon is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote