gpt4 book ai didi

linux - Cacti CentOS 问题

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:34:25 24 4
gpt4 key购买 nike

所以我正在运行 CentOS 6.5 并且我正在尝试安装和配置 Cacti。我一直反复遇到同样的问题。

为 Cacti 设置 MySQL 服务器

mysqladmin -u root password STRONGPASSWORD1

执行此步骤后,我收到:

mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'

当我尝试这些步骤时:

创建 MySQL Cacti 数据库

# mysql -u root -p
mysql> create database cacti;
mysql> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY ‘STRONGPASSWORD1’;
mysql> FLUSH privileges;
mysql> quit;

mysql -u root -p 开始,我可以使用 STRONGPASSWORD1 登录,但是当我尝试时:

create database cacti;

它给了我这个信息:

create database cacti;
ERROR 1007 (HY000): Can't create database 'cacti'; database exists

进入下一步:

GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY ‘STRONGPASSWORD1’;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 '‘STRONGPASSWORD1’' at line 1

最佳答案

看来您遇到的问题更多是 MySQL 而不是 Cacti。

关于您收到的错误:

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 '‘STRONGPASSWORD1’' at line 1

这似乎是你使用的引号尝试使用''而不是''

关于linux - Cacti CentOS 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22023437/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com