[<<][pool][>>][..]
Sat Feb 14 10:19:05 CET 2009

moving a database

To backup, save the output of this to a file:
mysqldump -u$USER -p$PASS --skip-lock-tables $DB_NAME > $FILE.SQL

To restore, send that file to the input of this:
mysql --verbose --user=$USER --password=$PASS 4DB_NAME < $FILE.SQL


But, make sure the user exists!

create database DB_NAME;

GRANT ALL PRIVILEGES ON $DB_NAME TO 'my_user'@'localhost' IDENTIFIED BY 'my_password'  WITH GRANT OPTION;


# The @host is optional.


[Reply][About]
[<<][pool][>>][..]