SonarQube default credentials for internal H2 db?

六眼飞鱼酱① 提交于 2019-12-13 14:12:26

问题


I'm running SonarQube 5.6.1 and am trying to save a view that I created. To do that, I want to take a peek at H2 DB that Sonar (according to it's own readme) uses for internal embedded DB.

I've ran the H2 jar file and in console was able to log in to dummy DB. If SonarQUbe is running, I can't connect.

So, what are default credentials for that DB? Tried my user credentials and admin/admin, none work. Admin/admin is default for SonarQube administrator user.


回答1:


The default values are sonar/sonar .

Edit: this was answered at the time of SonarQube 5.6.x. Recent versions (e.g. v6.7 LTS) might have changed to empty username/password (for embedded database).




回答2:


I'm using sonar 6.5 and username password was default values. username is sa without any password. I was able to backup database using following command (from sonar home directory):

java -cp lib/jdbc/h2/h2-1.3.176.jar org.h2.tools.Script -url jdbc:h2:tcp://localhost:9092/sonar

which is the same as:

java -cp lib/jdbc/h2/h2-1.3.176.jar org.h2.tools.Script -url jdbc:h2:tcp://localhost:9092/sonar -user sa

Also if server is down, you still can access database using:

-url jdbc:h2:<SONAR_HOME>/data/sonar -user sa



回答3:


Default is admin/admin version 7.1. Installed using brew.



来源:https://stackoverflow.com/questions/39207108/sonarqube-default-credentials-for-internal-h2-db

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