Liquibase not working with mysql in osx

Hello,

I’m trying to use Liquibase in OSX (10.6) and I can’t make it talk with MySQL.

    java -jar liquibase.jar --driver=com.mysql.jdbc.Driver --url=jdbc:mysql://root@127.0.0.1:3306/mysql2 diff --referenceUrl=jdbc:mysql://root@127.0.0.1:3306/mysql3

returns

    Liquibase Update Failed: Communications link failure

    The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    SEVERE 1/23/11 10:37 PM:liquibase: Communications link failure

    The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    liquibase.exception.DatabaseException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

    The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    at liquibase.integration.commandline.CommandLineUtils.createDatabaseObject(CommandLineUtils.java:88)
    at liquibase.integration.commandline.Main.doMigration(Main.java:613)
    at liquibase.integration.commandline.Main.main(Main.java:115)
    Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

    The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116)
    at com.mysql.jdbc.MysqlIO.(MysqlIO.java:343)
    at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2334)
    at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2371)
    at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2163)
    at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:794)
    at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:378)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
    at liquibase.integration.commandline.CommandLineUtils.createDatabaseObject(CommandLineUtils.java:79)
    … 2 more
    Caused by: java.net.UnknownHostException: root@127.0.0.1
    at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
    at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:850)
    at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1201)
    at java.net.InetAddress.getAllByName0(InetAddress.java:1154)
    at java.net.InetAddress.getAllByName(InetAddress.java:1084)
    at java.net.InetAddress.getAllByName(InetAddress.java:1020)
    at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:244)
    at com.mysql.jdbc.MysqlIO.(MysqlIO.java:292)
    … 15 more

I think that the JDBC driver is the main problem here, but I don’t know how to solve it. Does anyone managed to use diff on OSX wth MySQL?

Thanks!

I think your root@ JDBC syntax is not right.  I haven’t looked at the mysql JDBC uri format a lot, but I don’t think you can specify the username in there.  I think you need to specify url=jdbc:mysql://127.0.0.1:3306/mysql2 --username=root

Thanks Nathan! It worked with --username and --referenceUsername

The truth is that 重庆团购 everyone is searching for the same thing - happiness, peace, and 淘宝网首页 wholeness. Each of these things must start 淘宝网女装 from within. Since having knowledge has the power to 重庆二手交易 change you from the inside out, the best way to 淘宝网女装 obtain happiness is to fill your heart and mind with 重庆二手电脑 thoughts of hope and a more positive outlook toward the future. People 淘宝网 need to know that they are headed in the right 重庆二手手机 direction in order to remove any feelings of 淘宝 uncertainty.The World Began From a Single Life By Kazuo Murakami 淘宝商城 is designed to provide you with kGC9tO not only a satisfactory and entertaining reading experience.