mysqldump
:mysqldump -u root <DATABASE_NAME> <DUMP_FILE>.sql;
To create the new database:
mysql
mysql> create database <NEW_DATABASE_NAME>;
mysql> use <NEW_DATABASE_NAME>;
mysql> source <DUMP_FILE>.sql;
This is a place where I record snippets of information that I've found useful and that I think that I may need to refer to again. If anyone else finds them useful as well then that's great.
Got error: 1016: Can't open file: '...' (errno: 24) when using LOCK TABLES
ReplyDeletetable_cache might be too small.
Try --lock-tables=false on mysqldump.
From: http://mysql.bigresource.com/Track/mysql-L5WFTgJm/
Or --skip-lock-tables
ReplyDelete