I saw this error when the database is empty (no tables are created). Usually tables are created during first start of sonar.
Can you reach sonar by web interface?
Make sure that settings in your conf/sonar.properties
file in Sonar
directory are correct, these lines should be uncommented.
sonar.jdbc.url: jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true
sonar.jdbc.username: mysqlusername
sonar.jdbc.password: mysqlpassword
Then check if your conf/sonar-runner.properties
file in sonar-runer
directory has the same settings.
#----- MySQL
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8
#----- Global database settings
sonar.jdbc.username=mysqlusername
sonar.jdbc.password=mysqlpassword
Also make sure that the line for default embeded database is commented.
#sonar.jdbc.url: jdbc:h2:tcp://localhost:9092/sonar