Unable to access Sonar MySQL database Caused by: java.sql.SQLException: Access denied for user 'sonar'@'glassfishdev.ccs.local' (using password: YES)

妖精的绣舞 提交于 2019-12-04 17:00:59

The solution was to run the following command:

GRANT ALL ON *.* TO 'sonar'@'%';

The right solution is this:

GRANT ALL PRIVILEGES ON `sonar`.* TO 'sonar'@'localhost';

As explained here, connections to localhost occur over a UNIX domain socket. You are likely logging in as an anonymous user to localhost (e.g. ''@localhost).

I just tried it with sonar 4.5.2 with grants only on sonar.* and its definitely not working.

It looks like sonarqube requires additionnal privileges to work, personnaly i haven't identified which ones yet, and i'm still using a grant all on the database.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!