flush tables - access denied

一世执手 提交于 2019-12-10 12:36:37

问题


I need to back my database, but when trying to flush the tables before backing up I get this error? What does it mean by RELOAD privilege?

Can't find any RELOAD privilege in phpmyadmin!?

Error: Access denied; you need the RELOAD privilege for this operation
SQL: FLUSH TABLES WITH READ LOCK

回答1:


Probably you're not running FLUSH command using root, but with a limited user.
You need to be granted RELOAD privilege to run FLUSH command.
Take a look here for MySQL privileges.
So (for example) root user should use:

GRANT RELOAD ON *.* TO 'your_user'@'localhost';



回答2:


To clarify:
RELOAD can only be granted globally, not to a particular database. Need to use *.*

GRANT RELOAD ON *.* TO 'your_user'@'localhost';

From the MySQL docs: GRANT Syntax - Global Privileges

The CREATE USER, FILE, PROCESS, RELOAD, REPLICATION CLIENT, REPLICATION SLAVE, SHOW DATABASES, SHUTDOWN, and SUPER privileges are administrative and can only be granted globally.



来源:https://stackoverflow.com/questions/9972651/flush-tables-access-denied

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!