Friday, July 6, 2018

Access denied for user 'sonar'@'localhost' (using password: YES) - MySQL Errors installing SonarQube

Make sure you have setup user correctly in MySQL database and also correctly configured that user in sonar.properties.
 
mysql -u root -p
SHOW GLOBAL VARIABLES LIKE 'storage_engine’;
CREATE USER 'sonar'@'localhost' IDENTIFIED BY 'password';
CREATE DATABASE sonar;
GRANT ALL PRIVILEGES ON sonar.* TO 'sonar'@'localhost';

sudo vi /opt/sonarqube/conf/sonar.properties
#uncomment  the below lines
sonar.jdbc.username=sonar
sonar.jdbc.password=password

now start the server 
sh /opt/sonarqube/bin/linux-x86-64/sonar.sh start
for any issues, look at logs at 

tail -f /opt/sonarqube/logs/sonar.log

No comments:

Post a Comment