MySQL Forums
Forum List  »  Newbie

Re: Migrate database with mysqldump and mysqlrestore
Posted by: Rick James
Date: June 28, 2009 01:00AM

mysqlimport is the wrong tool.

Look at your file ( /tmp/testDB.sql ). You will, or won't see DROP and CREATE statements, depending on the options for mysqldump. If it does not do a CREATE DATABASE, then the first line will be needed:
$ mysql
mysql> CREATE DATABASE testDB;
mysql> source /tmp/testDB.sql
mysql> exit;

Options: ReplyQuote


Subject
Written By
Posted
Re: Migrate database with mysqldump and mysqlrestore
June 28, 2009 01:00AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.