Liquibase MySQL: syntax error near '????????????????' -


i trying run liquibase following parameters (default parameters, modified paths):

liquibase --driver=com.mysql.jdbc.driver \      --classpath=mysql-connector-java-5.1.20-bin.jar      --changelogfile=changelog.xml \      --url="jdbc:mysql://localhost/example" \      --username=root \      migrate 

changelog.xml minimal:

 <?xml version="1.0" encoding="utf-8"?>   <databasechangelog    xmlns="http://www.liquibase.org/xml/ns/dbchangelog"    xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"    xsi:schemalocation="http://www.liquibase.org/xml/ns/dbchangelog           http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">    </databasechangelog> 

and error is:

liquibase update failed: have error in sql syntax; check manual corresponds mysql server version right syntax use near '????????????????' @ line 1 severe 6/5/12 2:42 a.m.:liquibase: have error in sql syntax; check manual corresponds mysql server version right syntax use near '????????????????' @ line 1 liquibase.exception.databaseexception: com.mysql.jdbc.exceptions.mysqlsyntaxerrorexception: have error in sql syntax; check manual corresponds mysql server version right syntax use near '????????????????' @ line 1 @ liquibase.integration.commandline.commandlineutils.createdatabaseobject(commandlineutils.java:111) @ liquibase.integration.commandline.main.domigration(main.java:745)
@ liquibase.integration.commandline.main.main(main.java:134) caused by: com.mysql.jdbc.exceptions.mysqlsyntaxerrorexception: have error in sql syntax; check manual corresponds mysql server version right syntax use near '????????????????' @ line 1 @ com.mysql.jdbc.sqlerror.createsqlexception(sqlerror.java:1049) @ com.mysql.jdbc.mysqlio.checkerrorpacket(mysqlio.java:4096) @ com.mysql.jdbc.mysqlio.checkerrorpacket(mysqlio.java:4028) @ com.mysql.jdbc.mysqlio.sendcommand(mysqlio.java:2490) @ com.mysql.jdbc.mysqlio.sqlquerydirect(mysqlio.java:2651) @ com.mysql.jdbc.connectionimpl.execsql(connectionimpl.java:2677) @ com.mysql.jdbc.connectionimpl.configureclientcharacterset(connectionimpl.java:1943) @ com.mysql.jdbc.connectionimpl.initializepropsfromserver(connectionimpl.java:3541) @ com.mysql.jdbc.connectionimpl.connectonetryonly(connectionimpl.java:2443) @ com.mysql.jdbc.connectionimpl.createnewio(connectionimpl.java:2213) @ com.mysql.jdbc.connectionimpl.(connectionimpl.java:797) @ com.mysql.jdbc.connectionimpl.getinstance(connectionimpl.java:385)
@ com.mysql.jdbc.nonregisteringdriver.connect(nonregisteringdriver.java:305) @ liquibase.integration.commandline.commandlineutils.createdatabaseobject(commandlineutils.java:101) ...2 more

have no idea cause it. running liquibase 2.0.5.

thanks.

i have had similar problem, , '????????????????' made me suspect charset issue. appending:

  ?usejvmcharsetconverters=true

to url string in liquibase.properties, suggested in this post, fixed me.

i suggest try replacing:

  --url="jdbc:mysql://localhost/example"

by:

  --url="jdbc:mysql://localhost/example?usejvmcharsetconverters=true"

in liquibase command line.

hope helps.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -