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权限的用户进行备份。
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn