所以我正在运行 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/