This is a discussion on MYSQLDUMP, Create new database, before restoring SQL Data. within the PHP Language forums, part of the PHP Programming Forums category; I can use mysqldump to create a .sql file backup of my data.. For importing how can I test to ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
<Frank @ MyPlace.Com (Frank)> wrote in message
news:3f20f102.154973890@news.btclick.com... > I can use mysqldump to create a .sql file backup of my data.. > > For importing how can I test to see if the DB exists, if it does > import the .sql > > If not create the DB then import the .sql ! > > Thanks Dump the database with --opt --no-create-db mysqldump --opt --no-create-db database [tables] The manual SQL syntax would be something like USE dbname IF EXISTS dbname; Although I think the above commands accomplish what you want. Regards, Parallax |