如何在mysql数据库中添加超级权限? [英] how to add super privileges to mysql database?
问题描述
我正在尝试在mysql中执行查询.
I am trying to execute query in mysql.
SET GLOBAL log_bin_trust_function_creators =1;
错误:
SQL查询:
SET GLOBAL log_bin_trust_function_creators = 1
MySQL说:
#1227-访问被拒绝;您需要SUPER权限才能执行此操作
SQL query:
SET GLOBAL log_bin_trust_function_creators =1
MySQL said:
#1227 - Access denied; you need the SUPER privilege for this operation
我想知道如何为任何数据库分配SUPER
特权
I want to know that how do i assign SUPER
privileges to any database
推荐答案
您可以使用phpmyadmin
添加超级权限:
You can add super privilege using phpmyadmin
:
转到PHPMYADMIN>特权>编辑用户>在管理员"选项卡下,单击超级". >开始
Go to PHPMYADMIN > privileges > Edit User > Under Administrator tab Click SUPER. > Go
如果要通过Console
进行操作,请按以下步骤操作:
If you want to do it through Console
, do like this:
mysql> GRANT SUPER ON *.* TO user@'localhost' IDENTIFIED BY 'password';
执行上述代码后,以:
mysql> FLUSH PRIVILEGES;
您应该在*.*
上执行操作,因为SUPER不是仅适用于一个数据库的特权,而是全局的.
You should do in on *.*
because SUPER is not the privilege that applies just to one database, it's global.
这篇关于如何在mysql数据库中添加超级权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!