Migrating to Google Cloud SQL using flyway, what jar files should be copied?

我的梦境 提交于 2019-12-13 03:25:32

问题


I am trying to migrate my database(MySQL) dump file Google Cloud SQL using flyway commandline tool. I have copied google_sql.jar to flyway-commandline-1.6/jars/ and set the following properties in flyway-commandline-1.6/conf/flyway.properties:

flyway.driver=com.google.appengine.api.rdbms.AppEngineDriver
flyway.url=jdbc:google:rdbms://myinstancename/devdb
flyway.user=myusername
flyway.password=mypassword

However, this doesn't work and produces the following error:

FlywayException: Error instantiating database driver: com.google.appengine.api.rdbms.AppEngineDriver
Occured in com.googlecode.flyway.core.Flyway in method configure, line number 789
Caused by java.lang.ClassNotFoundException: com.google.appengine.api.rdbms.AppEngineDriver
Occured in java.net.URLClassLoader$1 in method run, line number 217

Could somebody help me in identifying the required jar files for flyway to work with Google Cloud SQL?


回答1:


It's weird and poorly documented on AppEngine's side, but you must also copy the MySQL Jdbc Driver into APPENGINE_HOME/lib/impl

See: Java Google App Engine and Google Cloud SQL running on local dev server



来源:https://stackoverflow.com/questions/10244319/migrating-to-google-cloud-sql-using-flyway-what-jar-files-should-be-copied

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!