Home >Database >Mysql Tutorial >mysql下普通用户备份数据库时无lock tables权限的解决方法_MySQL

mysql下普通用户备份数据库时无lock tables权限的解决方法_MySQL

WBOY
WBOYOriginal
2016-06-01 13:22:211265browse

bitsCN.com [root@bitsCN.com]# 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@bitsCN.com]# mysqldump -u dbuser -ppass db --skip-lock-tables > db.sql
解决2:

使用具有lock权限的用户进行备份。bitsCN.com

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