# Liquibase not working with mysql in osx

**URL:** <https://forum.liquibase.org/t/liquibase-not-working-with-mysql-in-osx/1084>\
**Category:** General Discussion\
**Created:** [January 23, 2011, 10:42pm UTC](https://forum.liquibase.org/t/liquibase-not-working-with-mysql-in-osx/1084 "2011-01-23T22:42:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefanvaduva](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@stefanvaduva](https://forum.liquibase.org/u/stefanvaduva)\
**Post date:** [January 23, 2011, 10:42pm UTC](https://forum.liquibase.org/t/liquibase-not-working-with-mysql-in-osx/1084/1 "2011-01-23T22:42:00Z")

</div>

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](mailto: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!

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [January 23, 2011, 10:42pm UTC](https://forum.liquibase.org/t/liquibase-not-working-with-mysql-in-osx/1084/2 "2011-01-23T22:42:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![stefanvaduva](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@stefanvaduva](https://forum.liquibase.org/u/stefanvaduva)\
**Post date:** [January 23, 2011, 10:42pm UTC](https://forum.liquibase.org/t/liquibase-not-working-with-mysql-in-osx/1084/3 "2011-01-23T22:42:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![canlady](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@canlady](https://forum.liquibase.org/u/canlady)\
**Post date:** [January 23, 2011, 10:42pm UTC](https://forum.liquibase.org/t/liquibase-not-working-with-mysql-in-osx/1084/4 "2011-01-23T22:42:00Z")

</div>

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