mysql使用普通用戶備份出現無lock tables權限的解決方法,需要的朋友可以參考下。
[root@jb51.net]# mysqldump -u dbuser -ppass db > db.sql
mysqldump: Got error: 1044: Access denied for user ‘dbuser’@’localhost’ to database ‘db’ when using LOCK TABLES
解決一:
加上-skip-lock-tables選項即可。即:
[root@jb51.net]# mysqldump -u dbuser -ppass db –skip-lock-tables > db.sql
解決2:
使用具有lock權限的用戶進行備份。
? 版權聲明
文章版權歸作者所有,未經允許請勿轉載。
THE END