无法为MySQL创建Bugzilla用户

问题描述

我正在尝试在Ubuntu 20.04上安装Bugzilla 5.0.6。 MysqL版本是8.0。

对于MysqL配置,Linux installation guide将我引向this page并提供创建“错误用户的说明:

flask.request

当我尝试这样做,或者使用各种元素在各个元素之间使用不同的间距和单引号引起的变体时,我总是会遇到语法错误

GRANT SELECT,INSERT,UPDATE,DELETE,INDEX,ALTER,CREATE,LOCK TABLES,CREATE TEMPORARY TABLES,DROP,REFERENCES ON bugs.*
TO bugs@localhost IDENTIFIED BY '$DB_PASS';

FLUSH PRIVILEGES;

因此,我按照Ubuntu 14.04 Quick Start Guide的建议从命令行进行了尝试:

MysqL> GRANT SELECT,REFERENCES ON bugs.* TO bugs@localhost IDENTIFIED BY '***';
ERROR 1064 (42000): You have an error in your sql Syntax; check the manual that corresponds to your MysqL server version for the right Syntax to use near 'IDENTIFIED BY '***'' at line 1
MysqL> GRANT SELECT,REFERENCES ON 'bugs'.'*' TO 'bugs'@'localhost' IDENTIFIED BY '***';
ERROR 1064 (42000): You have an error in your sql Syntax; check the manual that corresponds to your MysqL server version for the right Syntax to use near ''bugs'.'*' TO 'bugs'@'localhost' IDENTIFIED BY '***'' at line 1
MysqL> GRANT SELECT,REFERENCES ON 'bugs'.'*' TO 'bugs'@'localhost' IDENTIFIED BY '***';
ERROR 1064 (42000): You have an error in your sql Syntax; check the manual that corresponds to your MysqL server version for the right Syntax to use near ''bugs'.'*' TO 'bugs'@'localhost' IDENTIFIED BY '***'' at line 1

出现类似错误

MysqL -u root -p -e "GRANT ALL PRIVILEGES ON bugs.* TO bugs@localhost IDENTIFIED BY '$db_pass'"

如何创建Bugzilla用户

编辑根据此处的反馈,我将命令分开了:

$ sudo MysqL -e "GRANT ALL PRIVILEGES ON bugs.* TO bugs@localhost IDENTIFIED BY '***'"
ERROR 1064 (42000) at line 1: You have an error in your sql Syntax; check the manual that corresponds to your MysqL server version for the right Syntax to use near 'IDENTIFIED BY '***'' at line 1
$ sudo MysqL -e "GRANT ALL PRIVILEGES ON 'bugs'.'*' TO 'bugs'@'localhost' IDENTIFIED BY '***'"
ERROR 1064 (42000) at line 1: You have an error in your sql Syntax; check the manual that corresponds to your MysqL server version for the right Syntax to use near ''bugs'.'*' TO 'bugs'@'localhost' IDENTIFIED BY '***'' at line 1

现在怎么了?

编辑2 这已被标记为问题“如何在MysqL 8.0中授予root用户所有特权”的重复项。我的问题来自尝试遵循Bugzilla的说明。没有指导,我就无法知道这是Bugzilla的指令所造成的,并且我也无法知道我应该问的问题是:“如何在MysqL 8.0中授予root用户所有特权?”因此,该问题的存在对我或我所处的其他人都无济于事,尽管事实证明那里的解决方案可以解决Bugzilla指示中给出的错误

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)