0
我正在使用Sonarqube和MySql。我有Jenkins,我希望將Sonar runner與TC集成爲主要用於不同項目(Java,PHP)的項目。我做了以下操作:無法在jenkins上創建PoolableConnectionFactory
- 在windows平臺下載sonar zip(最新版本)。
- StartSonar.bat
- 我有一個MySQL CentOS中遠程VM:
- 我連接到遠程MySQL使用Cygwin SSH:
- 然後創建一個架構,如下:
的MySQL:
CREATE DATABASE sonar CHARACTER SET UTF8;
CREATE USER 'sonar'@'*' IDENTIFIED BY 'sonar';
GRANT ALL ON sonar.* TO 'sonar'@'*';
FLUSH PRIVILEGES;
- 然後我禁用VM防火牆與:
sudo systemctl stop firewalld
- 當我開始聲納與
StartSonar.bat
,我有以下錯誤:
堆棧跟蹤:
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'sonar'@'10.1.162.61' (using password: YES))
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549) ~[commons-dbcp-1.4.jar:1.4]
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388) ~[commons-dbcp-1.4.jar:1.4]
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044) ~[commons-dbcp-1.4.jar:1.4]
at org.sonar.core.persistence.DefaultDatabase.checkConnection(DefaultDatabase.java:115) ~[sonar-core-5.1.2.jar:na]
... 28 common frames omitted
Caused by: java.sql.SQLException: Access denied for user 'sonar'@'10.1.162.61' (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:996) ~[mysql-connector-java-5.1.34.jar:5.1.34]
我在這裏錯過了什麼?