- make a backup of a mysql database called DBNAME with: mysqldump -uUSERID -hDBHOST -pPASSWD --opt DBNAME > DBNAME.mysql
- create a new database with: mysql> create database NEWDB;
(user USERID must have CREATE permissions)
- unpack the backed-up copy of DBNAME into your new database NEWDB with:
mysql -uUSERID -hDBHOST -pPASSWD NEWDB < DBNAME.mysql
(will wipe out the exising DB)
Last modified
17 years ago
Last modified on Feb 24, 2009, 4:23:57 PM
Note:
See TracWiki
for help on using the wiki.
