Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Migrating MySql from Windows to Linux

Status
Not open for further replies.

Live2Die

Technical User
May 5, 2004
104
CA
Hello

I have a mysql database on a windows machine that i use for my website. But i built a new linux box running RH9 and now need to move my DB over to the new box. I have setup phpMyAdmin on both machines, So i exported the proper DB but when i restore it on the linux box it doesn't restore the proper structure or data.

The reason for the DB is PHPBB forums.

Any suggestions?

--------------------
Sometimes overlooking the little things causes headaches that are unneeded
 
No there is no change in versions. i have not tried mysqldump, don't know how to use it

--------------------
Sometimes overlooking the little things causes headaches that are unneeded
 
It's not very hard. Let's say the name of your database is "forums", you would issue this command:

mysqldump forums > forums.sql

This will create a file called forums.sql in the current directory. Transfer it over to the linux box then issue this command:

mysql forums < forums.sql

If you already have a database on the linux box, make sure to drop all the tables or you'll get an error message saying that the table already exists.

 
OK then...that is simple. Thanks I will give it a try when i get home from work.

--------------------
Sometimes overlooking the little things causes headaches that are unneeded
 
I think the Windows version offers mysqlhotcopy...

mysqlhotcopy databasename c:\somefolder
ftp to new server in binary mode(usually in /var/lib/mysql/databasename/*)
chown mysql:mysql /var/lib/mysql/databasename/*
(since it's redhat...)
service mysql restart

Good luck,
Mark
 
i used mysqldump and it worked like a charm

--------------------
Sometimes overlooking the little things causes headaches that are unneeded
 
i just copy the folder from 1 machine 2 the other

Binary Intelligence, true or false?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top