Creating or moving a MySQL database
Unlike SQL Server, you cannot reliably move a MySQL database by moving the binary files in the MySQL directory. Instead, you should use the mysqldump utility.
Open a command line window to the MySQL bin directory and make sure both mysql and mysqldump binaries are both present. On Linux this location is likely /usr/local/mysql/bin and on Windows this is most likely C:\Program Files\MySQL\MySQL Server 5.0\
Dump the database using a command like this:./mysqldump --user=user --password=pw database_name_here > db.sql
Then connect using the MySQL command line client and create the database:./mysql --user=user --password=pw
create database new_database_name
use new_database_name
source db.sql
posted by Brian at 7/16/2008 02:36:00 PM
0 Comments:
Post a Comment
<< Home