天天看點

Windows mysql下普通使用者備份資料庫時無lock tables權限的解決方法

這要過年了,伺服器的自動備份搞起,系統啟動,服務自動啟動搞起!!!

但是突然發現新賬号的備份總是是失敗.....

Got error: 1449: The user specified as a definer ('guides'@'%') does not exist when using LOCK TABLES.
           
mysqldudmp -u 資料庫使用者名 -p 資料庫密碼 資料庫 --skip-lock-tables > 備份資料庫.sql
           

重新加了一個參數就ok了:--skip-lock-tables 跳過鎖表備份

c:
cd C:\Program Files\MySQL\MySQL Server 5.5\bin
set "Ymd=%date:~,4%%date:~5,2%%date:~8,2%"
mysqldump -uzdx_zcsjw_dev -pZcsjw_DEV2018 --skip-lock-tables guides > E:\mysqlbak\guides\guides_%Ymd%.sql
           

繼續閱讀