- 創建數據庫,我試圖用
Liquibase
創建數據庫,做不存在。 我已經下載
MySQL
並沒有作出任何改變它如何使用Liquibase我的Maven插件代碼看起來像
<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]
我該如何解決?
你可能要考慮到變更使用創建模式。如果沒有其他幫助。 –