【问题标题】:error on starting grafana service启动grafana服务时出错
【发布时间】:2017-08-26 08:16:56
【问题描述】:

我在安装在 vm 上的 ubuntu 16.4 LTS 上有 grafana 4.4.3,它的 IP 是 1.2.3.4 。 我在 CentOS 5.9 上也有一个 mysql 数据库版本 5.0.95,它的 ip 是 5.5.5.5,我的数据库名称是:voip

我想将 mysql 设置为 grafana 的后端。我已经像这样更改了我的 grafana.ini 文件:

###[database]###    
type = mysql
host = 5.5.5.5:3306
name = voip
user = root
password = t@123
###[session]###
provider: mysql
provider_config = `root:t@123@tcp(5.5.5.5:3306)/voip`

我还将我的 root 帐户设置为远程帐户。

当我想启动 grafana-server 服务时,它给了我这个错误:

Fail to initialize orm engine" logger=sqlstore error="Sqlstore::Migration 
failed err: this user requires old password authentication. If you still 
want to use it, please add 'allowOldPasswords=1' to your DSN. See also 
https://github.com/go-sql-driver/mysql/wiki/old_passwords\n"

我该怎么办?我做错什么了吗?

【问题讨论】:

  • 错误信息实际上告诉你你需要做什么......虽然,你可能想将你的mysql升级到一个更新的版本(没有像14.12这样的mysql版本,你错了)
  • 真的很抱歉。数据库版本为 5.0.95。还有一件事....allowOldpassword 在我的 my.cnf 文件中设置。

标签: mysql grafana


【解决方案1】:

allowOldPasswords 使用旧版本的mysql数据库报错。要更改此设置,您应该转到 /etc/my.cnf 并将 oldpasswords = 1 更改为 oldpasswords = 0。接下来你必须登录到你的mysql,然后输入这些命令:

 SET SESSION old_passwords=FALSE;
 SET PASSWORD FOR 'user_name'@'%'=PASSWORD('<put password here>');
 flush privileges;

最后,重启你的mysql服务。

希望这篇文章对您有所帮助...

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-04-18
    • 2011-01-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多