zoukankan      html  css  js  c++  java
  • mysqldump: Couldn't execute 'SET OPTION SQL_QUOTE_SHOW_CREATE=1': You have an error in your SQL syntax; check the manual t

    1、备份mysql数据库时候出错,导出数据:

    [root@localhost ~]# mysqldump -uroot -p mysql >/root/bck.sql
    Enter password: 
    mysqldump: Couldn't execute 'SET OPTION SQL_QUOTE_SHOW_CREATE=1': You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION SQL_QUOTE_SHOW_CREATE=1' at line 1 (1064)

    2、查询是否mysqldump版本问题:

    [root@localhost ~]# mysqldump --version
    mysqldump  Ver 10.13 Distrib 5.1.71, for redhat-linux-gnu (x86_64)
    [root@localhost ~]# which mysqldump
    /usr/bin/mysqldump

    3、用5.6.23版本的mysqldump覆盖或者指定目录运行即可

    [root@localhost mysql]# cp /opt/mysql/mysql-5.6.23-linux-glibc2.5-x86_64/bin/mysqldump  /usr/bin/mysqldump 
    cp: overwrite `/usr/bin/mysqldump'? y

    4、查看是否备份成功:

    [root@localhost mysql]# mysqldump -uroot -h127.0.0.1  -p test > /root/1.sql
    Enter password: 
    [root@localhost ~]# cat 1.sql
    DROP TABLE IF EXISTS `SC`;
    /*!40101 SET @saved_cs_client     = @@character_set_client */;
    /*!40101 SET character_set_client = utf8 */;
    CREATE TABLE `SC` (
      `Scid` int(12) NOT NULL AUTO_INCREMENT,
      `Cno` int(10) NOT NULL,
      `Sno` int(10) NOT NULL,
      `Grade` tinyint(2) NOT NULL,
      PRIMARY KEY (`Scid`)
    .....................
  • 相关阅读:
    信号量Semaphore
    进程锁Lock
    创建多进程Process
    什么是进程?什么是线程?进程和线程之间的区别是什么?
    Git命令
    xss攻击问题以及如何防范
    ORM跨表查询问题
    for循环将字典添加到列表中出现覆盖前面数据的问题
    Linux源码的目录结构
    嵌入式中 MMU的功能
  • 原文地址:https://www.cnblogs.com/1021lynn/p/5315836.html
Copyright © 2011-2022 走看看