I installed using brew

brew install sonar

I then need a mysql database

CREATE USER 'sonar'@'localhost' IDENTIFIED BY 'sonar';
CREATE USER 'sonar'@'' IDENTIFIED BY 'sonar';
GRANT ALL PRIVILEGES ON sonar_source.* TO 'sonar'@'localhost';
GRANT ALL PRIVILEGES ON sonar_source.* TO 'sonar'@'';

# Created the user
# Now we should be able to start sonar

Modify Sonar config

First you need to find the sonar config files.... Start here

I used the command

find /usr/local/ | grep sonar | grep conf

Which returned me the output of


I then edited the file called /usr/local//Cellar/sonarqube/7.1/libexec/conf/ Note this will change with newer versions of the code.

Find the line with mysql on it - and uncomment it.

the line should now appear as

#----- MySQL 5.6 or greater
# Only InnoDB storage engine is supported (not myISAM).
# Only the bundled driver is supported. It can not be changed.

Restart Sonar

Simple with a

sonar restart

Now open a webpage to