標籤:mysql備份錯誤
今日遇到一個問題,mysql資料量備份出錯,記錄如下:
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M01/47/D1/wKioL1P_6kThejrOAAaxsonf7EI763.jpg" title="QQ20140829104300.jpg" alt="wKioL1P_6kThejrOAAaxsonf7EI763.jpg" />
錯誤顯示:
Enter password:
mysqldump: Got error: 1449: The user specified as a definer (‘ljgps‘@‘%‘) does not exist when using LOCK TABLES
查詢多次後,解決方案:
mysqladmin -uroot -p123456 flush-logs;
/opt/mysql/bin/mysql -uroot -p123456
/opt/mysql/bin/mysqldump -uljgps -p ljgps > ljgps.sql
添加ljgps使用者,備份時不要輸入密碼123456,資料庫會認為密碼過於簡單暴露而不去執行,可以這樣:
/opt/mysql/bin/mysqldump -uljgps -p ljgps > ljgps.sql
然後再輸入密碼:斷行符號執行即可。
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M01/47/CF/wKiom1P_60ujTpjuAAZdYlkyG5I100.jpg" title="9999.jpg" alt="wKiom1P_60ujTpjuAAZdYlkyG5I100.jpg" />
本文出自 “ghost” 部落格,請務必保留此出處http://caizi.blog.51cto.com/5234706/1546416
mysql備份錯誤記錄