1. Error when backing up MySQL database, export data:
[Email protected] ~]# mysqldump-uroot-p mysql >/root/bck.sqlenter password:mysqldump:Couldn' c2>'SET option sql_quote_show_create=1'option Sql_quote_show_ create=1' at line 1 (1064)
2, query whether mysqldump version issue:
[Email protected] ~]# mysqldump-- versionmysqldump10.135.1. redhat-linux-~]# which mysqldump/usr/bin/mysqldump
3, with 5.6.23 version of Mysqldump overwrite or specify directory to run
[Email protected] mysql]# cp/opt/mysql/mysql-5.6. -LINUX-GLIBC2. 5-x86_64/bin/mysqldump /usr/bin/mysqldump cp:overwrite '/usr/bin/mysqldump' ? y
4. Check if the backup was successful:
[Email protected] mysql]# mysqldump-uroot-h127.0.0.1-P Test >/root/1. Sqlenter password: [[email protected]~]# Cat1. Sqldrop TABLE IF EXISTS ' SC ';/*!40101 SET @saved_cs_client = @ @character_set_client*/;/*!40101 SET character_set_client = UTF8*/; CREATE TABLE ' SC ' (' Scid ' )int( A) not NULL auto_increment, ' Cno 'int(Ten) not NULL, ' Sno 'int(Ten) not NULL, ' Grade ' tinyint (2) not NULL, PRIMARY KEY (' Scid ') ... .... .......
Mysqldump:couldn ' t execute ' SET OPTION sql_quote_show_create=1 ': You have a error in your SQL syntax; Check the manual t