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. c++基础:之泛型与标准模板库

  2. Installing IIS 8 on Windows Server 2012微软官方安装指导

    from: https://www.iis.net/learn/get-started/whats-new-in-iis-8/installing-iis-8-on-windows-server-20 ...

  3. msyql 移动某一列数据到某列 & 字段加前缀

    #移动数据 UPDATE dcs_organize_user AS a, dcs_organize_user AS b SET a.SHORTTELNO=b.USERTELNO WHERE a.id= ...

  4. caffe的运行create_data.sh前对VOC2007图片格式的更改

    运用caffe进行深度学习之前需要对图片进行预处理,将图片的大小,格式等进行修改 将300*300的图片改为256*256格式 则将以下参数改为: min_dim=256 max_dim=256 wi ...

  5. SQLGetStmtAttr

    SQLGetStmtAttr 函数定义: SQLRETURN SQLGetStmtAttr( SQLHSTMT     StatementHandle, SQLINTEGER     Attribut ...

  6. RepRap Prusa i3 平台自動補正

    RepRap Prusa i3 平台自動補正 平台校正不但費時,而且經常失敗,時在是很令人洩氣!期盼了好一陣子,Marlin終於將平台自動補正的功能加進來了!!這個功能將原本Z軸的Endstop,改裝 ...

  7. BR(BoomerangRobot)机器人项目

    项目宗旨:推动机器人技术及相关知识的普及,增进广大机器人DIYer们的交流,提高爱好者们自身的专业水平,项目提供以机器人BR(boomerangrobot)为硬件平台,ROS(robot operat ...

  8. html5-css动画-2d

    div{    width: 300px;    height: 100px;    margin: 50px;    padding: 50px;    background: green;     ...

  9. Catch That Cow (bfs)

    Catch That Cow bfs代码 #include<cstdio> #include<cstring> #include<algorithm> #inclu ...

  10. jsp登陆界面代码

    <%@ page language="java" contentType="text/html; charset=UTF-8"     pageEncod ...