O'Reilly logo

Sonar Code Quality Testing Essentials by Charalampos Arapidis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Configuring MySQL

While the embedded Apache Derby database is ideal for tests, in a production development environment it is recommended to switch to an enterprise database.

Creating the database

Sonar comes bundled with an SQL script to create the database and the sonar user with the password sonar. The script is located at @SONAR_HOME/extras/database/mysql/create_database.sql. To execute the script, open up a terminal and execute the following command, (enter your root password or sonar when prompted):

$ mysql -u root -p < create_database.sql

The script creates a new Sonar database with UTF8 encoding and user sonar with password sonar.

Setting up Sonar with MySQL

Having the database up and running, we then must deactivate the embedded Apache Derby ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required