Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it correct mysqldump --add-drop-database generate !40000?

Tags:

mysql

I am using MySql v 6.1.7601. I was dumping a database trough this command:

mysqldump -u USERNAME -pPASSWORD --routines --add-drop-database --databases myDatabase> ...pathToSavedFile.sql

I was expecting to have

DROP DATABASE IF EXISTS myDatabase;
CREATE DATABASE IF NOT EXISTS myDatabase;
USE myDatabase;

... create table code ...

Instead, I am having this:

/*!40000 DROP DATABASE IF EXISTS `myDatabase` */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/ 'myDatabase' /*DEFAULT ....

How can I set to display properly (clear) the DROP and CREATE sentences ?

like image 249
IgorAlves Avatar asked Oct 25 '25 04:10

IgorAlves


1 Answers

This is a version marker for mysql. /*!<version> <command> */ will only run if the internal mysql version is greater than <version> (in this case, mysql 4.0).

There is literally nothing wrong with the dump, and this is expected.

like image 75
Amelia Avatar answered Oct 27 '25 17:10

Amelia