title: Cannot open connections to database. Sonar,Maven and Jenkins
body: <p>I am using maven's sonar:sonar goal to generate Sonar reports in one of my Jenkins job.</p>
  
  <p>My Jenkins host name is : jenhost.tst.com and My Sonar host is sonhost.tst.com and My Sonar jdbc url is : jdbc:mysql://sonhost.tst.com:3306/sonar, this database has a user names sonar created with proper permissions.</p>
  
  <p>Now While running the Maven goal, I am getting the error:</p>
  
  <p>Cannot open connection to database: Access denied for user 'sonar'@jenhost.tst.xxxx.com' (using password: YES)</p>
  
  <p>The weird thing in the above error is that the sonar user is trying to access my Jenkins host as a database name and not the sonar host.</p>
  
  <p>I have checked my Maven settings.xml and the database URL of Sonar is mentioned correctly there, and it is mentioned correctly in Jenkins too.</p>
  
  <p>Does any one have any clue regarding this one?</p>