事件调度程序无法启用(mysql)

时间:2014-07-27 03:35:34

标签: mysql sql

当我尝试这段代码时:

SHOW GRANTS FOR 'secret'@'localhost';

这是结果:

Grants for secret@localhost
GRANT USAGE ON *.* TO 'secret'@'localhost' IDENTIFIED BY PASSWORD 'secretpass'
GRANT ALL PRIVILEGES ON `secret\_dbx`.* TO 'secret'@'localhost'
GRANT ALL PRIVILEGES ON `secret\_db1x`.* TO 'secret'@'localhost'

但是当我想在

上设置event_scheduler时
SET GLOBAL event_scheduler = "ON"

此错误显示:

 #1227 - Access denied; you need (at least one of) the SUPER privilege(s) for this operation 

然后尝试了这段代码:

 GRANT SUPER ON *.* TO secret@'localhost' IDENTIFIED BY 'secretpass';
 FLUSH PRIVILEGES;

然后是错误:

 Access denied for user 'secret'@'localhost' (using password: YES)

我知道我使用root,我使用用户名和密码访问我域名的控制面板。

2 个答案:

答案 0 :(得分:0)

检查docs。所有权限都在这里给出。

我认为你需要代码如下:

CREATE USER 'secret_user@localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON * . * TO 'secret_user@localhost';
FLUSH PRIVILEGES;

有关详细信息,请查看here

答案 1 :(得分:-2)

找到答案......遗憾的是我必须从事cron工作,因为我共享了一个托管...现在我讨厌卖家托管