Importing FreeBSD mysql database to RedHat Linux 7.3
Hi,
I have one server running on FreeBSD with MYSQL and a RedHat Linux 7.3 server. I have to import the mysql database from FreeBSD to Linux server. I don;t know how to do that? I know that mysql databases in RedHat 7.3 are in /var/lib/mysql and on freeBSD looks like in /usr/local/mysql/var These databases are directories in the path I said above. If I copy the Database directory from BSD to Linux will it work?? Can anyone help me out? regards Krishna |
I believe you should be able to create a database with the same name, then copy the files from var/dbName on the old server to the same location on the new server. Failing this use mysqldump to dump the entire db to a file, then use mysql -p someDb < dumpfile.sql to enter all the values again.
HTH Jamie... |
Hey, can you explain that to me clearly?
regards krishna |
Quote:
Code:
mysqldump -u root -p -a -e > dbContents.sql Code:
mysql -u root -p < dbContents.sql cheers Jamie... |
Thanks Jamie
Will try this out!! regards Krishna |
HI,
Doesn't work on freebsd!! regards Krishna |
You don't have mysqldump? It should be there somewhere, are you sure its just not in your path? Or did something else fail?
cheers Jamie... |
All times are GMT -5. The time now is 10:38 AM. |