标签:lin date 过程 ati function 图片 ret connect lepus
在搭建lepus过程中,lepus启动失败
用tail -f /usr/local/lepuslogs/lepus.log查看错误日志为:
import functions as func
File "./include/functions.py", line 285, in <module>
mail_host = get_option(‘smtp_host‘)
File "./include/functions.py", line 242, in get_option
conn=MySQLdb.connect(host=host,user=user,passwd=passwd,port=int(port),connect_timeout=5,charset=‘utf8‘)
File "/usr/lib64/python2.6/site-packages/MySQLdb/__init__.py", line 81, in Connect
return Connection(*args, **kwargs)
File "/usr/lib64/python2.6/site-packages/MySQLdb/connections.py", line 193, in __init__
super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (1045, "Access denied for user ‘root‘@‘localhost‘ (using password: YES)")
应该是mysql的原因,直接输入mysql可以登录,用mysql -uroot -p登录报错
先用mysql等录进去,查看数据库,发现先前配置的lepus数据库不在了,
重新执行以下命令,成功
1.在监控机创建监控数据库,并授权。
mysql> create database lepus default character set utf8;
mysql> grant select,insert,update,delete,create on lepus.* to ‘root‘@‘localhost‘ identified by ‘123456‘;
mysql> flush privileges;
2.导入SQL文件夹里的初始化SQL文件(表结构和数据文件)
/usr/local/lepus/sql 这个地方执行以下2个语句
# mysql -uroot -p lepus < sql/lepus_table.sql
# mysql -uroot -p lepus < sql/lepus_data.sql
最后lepus重启成功!!!
安装lepus,启动失败,报错:Access denied for user 'root'@'localhost' (using password: YES)
标签:lin date 过程 ati function 图片 ret connect lepus
原文地址:https://www.cnblogs.com/yangtou45du/p/10551071.html