title: JHipster - Running liquibase:diff fails due to "Access denied"
body: <p>When adding a field to an Entity in JHipster, the last step (when using MySQL) is running </p>
  
  <blockquote>
    <p>./mvnw compile liquibase:diff</p>
  </blockquote>
  
  <p>As per the docs at <a href="https://jhipster.github.io/development/" rel="nofollow noreferrer">https://jhipster.github.io/development/</a></p>
  
  <p>However, this doesn't work for my rather simple install, because the process doesn't use the correct MySQL user and pass. My app runs fine in dev profile, but not like this.</p>
  
  <p>Where does Liquibase get its credentials from?</p>
  
  <p>Below you can see the output.</p>
  
  <pre><code>[INFO]   artifact: file:/Users/wouter/.m2/repository/org/glassfish/javax.el/3.0.0/javax.el-3.0.0.jar
  [INFO]   artifact: file:/Users/wouter/.m2/repository/org/springframework/boot/spring-boot-devtools/1.4.2.RELEASE/spring-boot-devtools-1.4.2.RELEASE.jar
  [INFO]   artifact: file:/Users/wouter/Business/Workspace/imi-publishing-cloud/target/classes/
  [INFO]   artifact: file:/Users/wouter/Business/Workspace/imi-publishing-cloud/target/test-classes/
  [INFO] ------------------------------------------------------------------------
  [INFO] Settings
  ----------------------------
  [INFO]     driver: com.mysql.jdbc.Driver
  [INFO]     url: jdbc:mysql://localhost:3306/imicloud
  [INFO]     username: root
  [INFO]     password: *****
  [INFO]     use empty password: false
  [INFO]     properties file: null
  [INFO]     properties file will override? false
  [INFO]     prompt on non-local database? true
  [INFO]     clear checksums? false
  [INFO]     changeLogFile: src/main/resources/config/liquibase/master.xml
  [INFO]     context(s): null
  [INFO]     label(s): null
  [INFO]     referenceDriver: null
  [INFO]     referenceUrl: hibernate:spring:be.storefront.imicloud.domain?dialect=org.hibernate.dialect.MySQL5InnoDBDialect&amp;hibernate.physical_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy&amp;hibernate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy
  [INFO]     referenceUsername: null
  [INFO]     referencePassword: null
  [INFO]     referenceDefaultSchema: null
  [INFO]     diffChangeLogFile: src/main/resources/config/liquibase/changelog/20170125143850_changelog.xml
  [INFO] ------------------------------------------------------------------------
  Wed Jan 25 15:38:57 CET 2017 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 7.129 s
  [INFO] Finished at: 2017-01-25T15:38:58+01:00
  [INFO] Final Memory: 63M/787M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.5.3:diff (default-cli) on project imicloud: Error setting up or running Liquibase: liquibase.exception.DatabaseException: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO) -&gt; [Help 1]
  [ERROR] 
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
  </code></pre>
  
  <p>It first appears the correct settings are used. My DB is called "imicloud", but then later the error is:</p>
  
  <pre><code>java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO) 
  </code></pre>
  
  <p>Obviously I am using a password for MySQL.</p>
  
  <p>How to fix this?</p>
  
  <p>I guess I missed an essential setup step as this is the first time I'm using the <code>liquibase:diff</code> command.</p>