Bug #25233 Migration toolkit fails to connect to mysql server 5.0.27 through JDBC Driver 5.
Submitted: 21 Dec 2006 13:26 Modified: 21 Dec 2006 16:43
Reporter: Abdul Hamid Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Migration Toolkit Severity:S2 (Serious)
Version:1.1.8 OS:Windows (windows server web edition)
Assigned to: CPU Architecture:Any
Tags: 1.1.8, 5.0.27, MySQL JDBC Driver 5.0

[21 Dec 2006 13:26] Abdul Hamid
Description:
I've been using Mysql migration toolkit successfully with mysql community server 5.0.22.

Since upgrading the mysql community server to 5.0.27 the migration toolkit simply fails to connect to the mysql server through mysql JDBC Driver 5.0 and returns the following error:

The connection to the target database could not be established (error: 0).
ReverseEngineeringMysqlJdbc.getVersion :Unknown initial character set index '48' received from server. Initial client character set can be forced via the 'characterEncoding' property.
Details: 
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910)
com.mysql.jdbc.Connection.configureClientCharacterSet(Connection.java:2345)
com.mysql.jdbc.Connection.initializePropsFromServer(Connection.java:3913)
com.mysql.jdbc.Connection.createNewIO(Connection.java:2683)
com.mysql.jdbc.Connection.<init>(Connection.java:1531)
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
java.sql.DriverManager.getConnection(Unknown Source)
java.sql.DriverManager.getConnection(Unknown Source)
com.mysql.grt.modules.ReverseEngineeringGeneric.establishConnection(ReverseEngineeringGeneric.java:96)
com.mysql.grt.modules.ReverseEngineeringGeneric.getVersion(ReverseEngineeringGeneric.java:116)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
com.mysql.grt.Grt.callModuleFunction(Unknown Source)

How to repeat:
Install mysql migration tool kit 1.1.8 then install JRE 1.5.0.10 for windows. Then install mysql community server 5.0.27.

Then finally run mysql migration toolkit from the start menu and follow the onscrean instuctions. When it reaches connecting to servers window it fails to connect to mysql server. 

Suggested fix:
I simply downgraded the mysql community server to version 5.0.22 and its working fine.
[21 Dec 2006 13:36] Abdul Hamid
.
[21 Dec 2006 14:32] Valeriy Kravchuk
Thank you for a problem report. In my case MT 1.1.8 connects without any problems to (local) 5.0.27-nt on Windows XP. The only potential difference I see in our setups is that I use JRE 1.5.0_06-b05 (and XP SP2). So, can you, please, check with older/other versions of JRE/Windows and inform about ther results? 

Is it 32- or 64-bit Windows in your case?
[21 Dec 2006 15:54] Abdul Hamid
It's 32bit version of windows im using. The toolkit seems to work using the old version jre1.5.0_06 with the new version of mysql server 5.0.27. I Guess i need to report this bug to Sun.

thanks for your help.
[21 Dec 2006 16:43] Valeriy Kravchuk
Closed as this is, likely, not a bug in MySQL's software but some JRE version related problem.
[17 Jun 2007 18:19] Mitesh Raval
I finally got around this issue without having to downgrade components. There is no issue with the JRE or MySQL.

This is a setup issue while using the same PC to be host as well as client. MySql needs to be setup properly for the Server and client character sets. So I updated the my.conf file in C:\xampp\mysql\bin. These are the lines that I updated:

///// old lines ///////
character-set-server = latin1
collation-server = latin1_general_ci

//// new lines ///////
character-set-server = utf8
collation-server = utf8_general_ci

Just restart the MySql server and thats it!