Home > Database > Mysql Tutorial > body text

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

WBOY
Release: 2016-06-07 18:05:31
Original
1307 people have browsed it

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权限的用户进行备份。
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template