使用flyway迁移到Google Cloud SQL时,应复制哪些jar文件? [英] Migrating to Google Cloud SQL using flyway, what jar files should be copied?

查看:108
本文介绍了使用flyway迁移到Google Cloud SQL时,应复制哪些jar文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用flyway命令行工具迁移数据库(MySQL)转储文件Google Cloud SQL.我已将google_sql.jar复制到flyway-commandline-1.6/jars/并在flyway-commandline-1.6/conf/flyway.properties中设置了以下属性:

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

有人可以帮助我确定飞车使用Google Cloud SQL所需的jar文件吗?

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

推荐答案

在AppEngine方面,它很奇怪且文档很少,但是您还必须将MySQL Jdbc驱动程序复制到APPENGINE_HOME/lib/impl

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

请参阅: Java在本地开发服务器上运行的Google App Engine和Google Cloud SQL

这篇关于使用flyway迁移到Google Cloud SQL时,应复制哪些jar文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆