在我的〜/ .bashrc:MySQL JDBC驅動程序使用遷飛
export CLASSPATH=~/mysqljdbc/mysql-connector-java-5.1.21-bin.jar
CLASSPATH變種是正確的:
[email protected]:~$ echo $CLASSPATH
/home/ray/mysqljdbc/mysql-connector-java-5.1.21-bin.jar
試圖運行它:
[email protected]:/var/www/project$ sh ~/flyway-commandline-1.7/flyway.sh -driver=com.mysql.jdbc.Driver -user=root -p=password -url=jdbc:mysql://localhost:3306/project init
Flyway (Command-line Tool) v.1.7
FlywayException: Unable to instantiate jdbc driver: com.mysql.jdbc.Driver
Occured in com.googlecode.flyway.core.util.jdbc.DriverDataSource.<init>() at line 93
任何想法,爲什麼它找不到這個驅動程序?
謝謝!
我現在也更改了Flyway命令行的錯誤消息,以便更容易發現和修復。 – 2012-07-21 10:52:52