centos7.5 导出整个数据库报错

问题:

[root@db01 ~]# mysqldump -uroot -pBgx123.com --all-databases --single-transaction --master-data=1 --flush-logs >/root/db_$(date +%F)_all.sql
mysqldump: [Warning] Using a password on the command line interface can be insecure.
mysqldump: Couldn't execute 'SHOW VARIABLES LIKE 'gtid\_mode'': Native table 'performance_schema'.'session_variables' has the wrong structure (1682)

原因:

需要升级mysql

解决方法:

[root@db01 ~]# mysql_upgrade -u root -pBgx123.com --force	#升级mysql
[root@db01 ~]# systemctl restart mysqld #注意需要重启mysqld
[root@db01 ~]# mysqldump -uroot -pBgx123.com --all-databases --single-transaction --master-data=1 --set-gtid-purged=OFF --flush-logs >/root/db_$(date +%F)_all.sql #成功
mysqldump: [Warning] Using a password on the command line interface can be insecure.
[root@db01 ~]# ll
-rw-r--r-- 1 root root 529693 Mar 6 19:51 db_2019-03-06_all.sql

mysqldump: Couldn't execute 'SHOW VARIABLES LIKE 'ndbinfo_version'': Native table 'performance_schema'.'session_variables' has the wrong structure (1682)的更多相关文章

  1. "Native table 'performance_schema'.'session_variables' has the wrong structure") [SQL: "SHOW VARIABLES LIKE 'sql_mode'"]

    mysql_upgrade -u root -p--force 升级完重启

  2. mysqldump导出备份数据库报Table ‘performance_schema.session_variables‘ doesn‘t exist

    今天在bash进行本地数据库往云端数据库导数据的时候,在本地导出.sql文件这第一步就出现了错误问题,导出sql文件的命令: mysqldump -u 用户名 -p 数据库名 > xxx.sql ...

  3. mysqldump: Couldn't execute 'show table status '解决方法

    执行:[root@host2 lamp]# mysqldump -F -R -E --master-data=2   -p -A --single-transaction 在控制台端出现 mysqld ...

  4. 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 passwor ...

  5. mysqldump: Couldn't execute 'SET OPTION SQL_QUOTE_SHOW_CREATE=1'

    源码安装的mysql数据库,在执行mysqldump的时候报错: # mysqldump -u root -p --all-databases > dbdump.db Enter passwor ...

  6. mysqldump: Couldn't execute 'show events': Cannot proceed because system tables used by Event Schedu

    最近将老版本的mysql 实例倒入 percona 5.5.30,使用的是线上的全备,结果将mysql 库下的表也倒入了,这下可悲剧了,备份报错. 没办法,将mysql库下的数据倒出来,清空,再倒入p ...

  7. mysqldump 失败

    背景交代 mysql版本:mysql Ver 14.14 Distrib 5.7.11, for Linux (x86_64) using EditLine wrapper os:Linux vers ...

  8. 03: MySQL基本操作

    MySQL其他篇 目录: 参考网站 1.1 MySQL 三种数据类型(数值,字符串,日期) 1.2 MySQL常用增删改查命令 1.3 删除,添加或修改表字段 1.4 MySQL外键关联(一对多) 1 ...

  9. MySQL 【进阶查询】

    数据类型介绍 整型 tinyint, # 占1字节,有符号:-128~127,无符号位:0~255 smallint, # 占2字节,有符号:-32768~32767,无符号位:0~65535 med ...

随机推荐

  1. activiti_change_ok

    package com.xinwei.process.controller; import java.util.Calendar; import java.util.HashMap; import j ...

  2. [ English ] Ping sb.

    What does "Ping Me" mean?   Recently, when I asked a colleague to ping me, he responded wi ...

  3. Block 实践

    OC版 函数中无参无返回值 /* 作为函数参数类型的格式 返回值类型 (^)(形参列表) */ CZPerson.h - (void) test:(void (^)(void))block; CZPe ...

  4. Spark学习之路 (五)Spark伪分布式安装

    一.JDK的安装 JDK使用root用户安装 1.1 上传安装包并解压 [root@hadoop1 soft]# tar -zxvf jdk-8u73-linux-x64.tar.gz -C /usr ...

  5. python中常见的错误类型

    Python异常类 Python是面向对象语言,所以程序抛出的异常也是类.常见的Python异常有以下几个 ,大家只要大致扫一眼,有个映像,等到编程的时候,相信大家肯定会不只一次跟他们照面(除非你不用 ...

  6. 什么是Unicode

    写这篇博客的原因, 从做软件开始,什么ASCII码, Unicode,UTF-8,UTF-16,UTF-32......这些鬼东西总是经常碰到,只知道这些鬼是编码格式,其他的就啥都不清楚了,既然总是遇 ...

  7. navicat链接阿里云mysql报80070007: SSH Tunnel: Server does not support diffie-hellman-group1-sha1 for keyexchange

      http://www.jianshu.com/p/200572ed066c navicat 链接数据库 使用navicat 的ssh通道连接数据库回遇到权限问题 错误代码如下: 80070007: ...

  8. centos-ftp搭建

    参照https://blog.csdn.net/a735834365/article/details/80622105 https://blog.csdn.net/a735834365/article ...

  9. [转载]dbms_lob用法小结

    http://blog.sina.com.cn/s/blog_713978a50100prkt.html CLOB里存的是2进制 判定长度   DBMS_LOB.GETLENGTH(col1)获取文本 ...

  10. P1012 拼数

    P1012 拼数 输入输出样例 输入样例 3 13 312 343 输出样例 34331213 注意 当你输入: 6321 32 407 135 13 217 应该输出: 40732321217135 ...