MySQL GRANT reload on
时间: 2023-09-24 20:02:22 浏览: 83
The `GRANT RELOAD` command in MySQL is used to grant a user the ability to execute the `FLUSH` and `RELOAD` commands. These commands are used to flush various MySQL caches and reload privilege tables.
To grant a user the `GRANT RELOAD` privilege, you can use the following command:
```
GRANT RELOAD ON *.* TO 'user'@'localhost';
```
This grants the `user` account the ability to execute the `FLUSH` and `RELOAD` commands on all databases and tables in the local MySQL server.
Note that the `GRANT RELOAD` privilege is a powerful privilege that should only be granted to trusted users who need it for administrative purposes.
相关问题
mysql的RELOAD权限
在MySQL中,`RELOAD`权限允许用户重新加载或刷新服务器配置和权限表,以及重新加载或刷新表、日志和主从复制等操作。具体来说,这个权限包括以下操作:
1. `RELOAD`:重新加载服务器配置文件。
2. `SHUTDOWN`:关闭服务器。
3. `PROCESS`:查看其他用户的进程。
4. `SUPER`:执行超级管理员操作,如更改全局系统变量等。
要授予或撤销`RELOAD`权限,可以使用MySQL的授权命令(`GRANT`和`REVOKE`)。例如,要将`RELOAD`权限授予给用户`myuser`,可以使用以下命令:
```sql
GRANT RELOAD ON *.* TO 'myuser'@'localhost';
```
如果要撤销`RELOAD`权限,可以使用以下命令:
```sql
REVOKE RELOAD ON *.* FROM 'myuser'@'localhost';
```
请注意,授权和撤销权限的操作需要具有足够权限的MySQL用户才能执行。
GRANT reload on *.* to 'prod_yifei_sg'@'localhost';
这条 SQL 语句的作用是授予名为 'prod_yifei_sg' 的用户在所有数据库中执行 reload 命令的权限,该用户只能在本地访问 MySQL 服务器。 reload 命令可以重新加载 MySQL 服务器的授权表或者重载日志文件等操作。注意,这条语句应该只在必要的情况下授予,因为 reload 命令拥有特殊的权限,可能会对 MySQL 服务器的安全性产生影响。
相关推荐
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)