mysqldump 失敗


背景交代

mysql版本:mysql Ver 14.14 Distrib 5.7.11, for Linux (x86_64) using EditLine wrapper

os:Linux version 3.13.0-24-generic (buildd@panlong) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #46-Ubuntu SMP

 

問題:

在備份數據庫時報如下問題

command

  root@localhost:/home/ls# mysqldump -u root -p test > test.sql

problem

  mysqldump: Couldn't execute 'SHOW VARIABLES LIKE 'gtid\_mode'': Table 'performance_schema.session_variables' doesn't exist (1146)

網上鎖了好多解決辦法,什么使用“--set-gtid-grupe=off”參數等。試了都沒有起到任何作用。

最后在萬能的stackoverflow上找到了答案

  http://stackoverflow.com/questions/33270703/error-1142-select-command-denied-on-session-variables-table-with-mysqldump

  具體的解決辦法:

    1)mysql_upgrade -u root -p --force #更新

        2)service mysql restart  #restart mysql service

    3)mysqldump -u root -p test > test.sql #重新備份數據

找到了解決辦法,肯定要知道是什么原因導致的該問題,要不然出去吹牛都不知道怎么吹。你說是不是呀

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM