- I am trying to use
Liquibase
to create database that does not exists. I have downloaded
MySQL
and not made any change in itMy maven plugin code looks like
<plugins> <plugin> <groupId>org.liquibase</groupId> <artifactId>liquibase-maven-plugin</artifactId> <version>3.1.1</version> <configuration> <changeLogFile>src/main/resources/changelog.xml</changeLogFile> <driver>com.mysql.jdbc.Driver</driver> <url>jdbc:mysql://localhost:3306/myApp?createDatabaseIfNotExist=true</url> </configuration> <executions> <execution> <phase>process-resources</phase> <goals> <goal>update</goal> </goals> </execution> </executions> </plugin> </plugins>
mvn clean install
时,出现如下错误:Failed to execute goal org.liquibase:liquibase-maven-plugin:3.1.1:update (default) on project database_seed: Error setting up or running Liquibase: liquibase.exception.DatabaseException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Access denied for user ''@'localhost' to database 'myApp' -> [Help 1]
如何解决这个问题?