gerrit 配置错误

1、在运行java -jar *.war  init -d ~/review

fatal: DbInjector failed
fatal: Unable to determine SqlDialect
fatal: caused by java.sql.SQLException: Access denied for user 'gerrit2'@'localhost' (using password: YES)

2、具体原因是 gerrit2 没有权限登录到 mysql

mysql -u root -p
如果出现不记得密码了
1、先停止mysql
service mysql stop 或者 /etc/init.d/mysql stop
具体取决于mysql安装路径或者是否添加到环境变量里面去
2、跳过权限认证 --skip-grant-tables选项重启MySQL服务:
./bin/mysqld_safe --skip-grant-tables --user=root &
3、登录mysql 更改密码
mysqladmin -u root -p password "新密码" 回车 
use mysql;
update user set password = password ('新密码') where user = '用户'
 flush privileges;

猜你喜欢

转载自www.cnblogs.com/king258/p/11109307.html
今日推荐