---
title: "navicat 远程连接 redmine mysql 失败 "
author: "jacklin2015"
date: "2016-01-25T15:16:03Z"
tags: ["MySQL", "navicat"]
categories: ["数据库"]
slug: "navicat-redmine-mysql"
draft: false
lastmod: "2016-01-25T15:16:03Z"
id: 2273727
url: "https://jacklin2015.iteye.com/blog/2273727"
---

navicat 远程连接 redmine mysql 失败 

solution：
#mysql  -u root -p
#password：

mysql> grant all privileges on *.* to 'bitnami'@'%' identified by 'a4f90127b5';
 （bitnami 为用户名，a4f90127b5 为密码）
mysql>  flush privileges;
mysql > quit

重启 就ok 了。

ps：
 如果 #mysql  -u root -p 提示 access denied   ;或者 root 密码忘了 
参考下面：
imeadmin@imeadmin:~/redmine-2.4.1-1/mysql$ vim my.cnf  
在 [mysqld]  加入 skip_grant_tables
重启 imeadmin@imeadmin:~/redmine-2.4.1-1/mysql$ ../ctlscript.sh restart mysql

imeadmin@imeadmin:~/redmine-2.4.1-1/mysql$ bin/mysql  -uroot mysql

mysql> UPDATE user SET Password=PASSWORD('root123') where USER='root'; 

mysql> FLUSH PRIVILEGES;     

mysql> quit 
完了之后在回到开始处再操作就可以了 ，改完最好重启一下mysql。
