Mysqldump:couldn ' t execute ' SET OPTION sql_quote_show_create=1 ' problem

Source: Internet
Author: User

1, problem description

Using mysqldump Backup, Backup command:

[Email protected] opt]# mysqldump-uroot-p--skip-quote-names--databases Test--tables t >test1.sql

Mysqldump:couldn ' t execute ' SET OPTION sql_quote_show_create=1 ': You have a error in your SQL syntax; Check the manual-corresponds to your MySQL server version for the right syntax-use-near ' OPTION sql_quote_show_cre Ate=1 ' at line 1 (1064)

2. Exploration of problems

2.1 Changing the parameter Sql_quote_show_create status value

Mysql> Show variables like ' sql_quote_show_create ';

+-----------------------+-------+

| variable_name | Value |

+-----------------------+-------+

| Sql_quote_show_create | On |

+-----------------------+-------+

1 row in Set (0.01 sec)


mysql> set global Sql_quote_show_create=off;

Query OK, 0 rows Affected (0.00 sec)


Mysql> exit

Bye

Continuing with the above backup, the problem remains.

2.2 Version Query

Query MySQL current version:

Mysql> select version ();

+-----------+

| Version () |

+-----------+

| 5.6.20 |

+-----------+

1 row in Set (0.00 sec)

Query the system for a Legacy installation package:

[[email protected] opt]# rpm-qa|grep-i MySQL

Mysql-5.0.95-5.el5_9

Mysql-python-1.2.3-0.1.c1.el5

As you can see, there are mysql5.0 installation packages available here.

2.3 Attempt to perform backup from mysqldump source path

Check mysqldump location:

[email protected] opt]# which mysqldump

/usr/bin/mysqldump

Back up again, OK.

[Email protected] opt]#/usr/local/mysql/bin/mysqldump-uroot-p--skip-quote-names--databases Test--tables t >test 1.sql

3. Solutions

[Email protected] bin]# ls-l mysqldump

-rwxr-xr-x 1 root root 66860 Jan mysqldump

[[Email protected] bin]# Date

Wed Dec 11:39:37 CST 2014

[Email protected] bin]# rm-f/usr/bin/mysqldump

[Email protected] bin]# cp/usr/local/mysql/bin/mysqldump/usr/bin/

[Email protected] bin]#/usr/local/mysql/bin/mysqldump-uroot-p--skip-quote-names--complete-insert--databases test --tables T >test1.sql

Enter Password:

[Email protected] bin]#

Delete the/usr/bin directory mysqldump, the/usr/local/mysql/bin directory under the mysqldump copy of the past, the problem solved.


Mysqldump:couldn ' t execute ' SET OPTION sql_quote_show_create=1 ' problem

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.