Bug #26178 Opening connection ...
Submitted: 8 Feb 2007 6:10 Modified: 15 Feb 2007 14:18
Reporter: martin ziegert Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Migration Toolkit Severity:S3 (Non-critical)
Version: OS:
Assigned to: CPU Architecture:Any

[8 Feb 2007 6:10] martin ziegert
Description:
Hi,
it seems like that the coonection dont work, hiere is the error messag. Help on this would be grat, thanks Martin
Opening connection ... 
Connection jdbc:mysql://localhost:3306/?user=admin&password=thalia&useServerPrepStmts=false&characterEncoding=UTF-8
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:
Opening connection ...
[8 Feb 2007 7:12] Valeriy Kravchuk
Thank you for a problem report. What version of MySQL server are you connecting to?
[8 Feb 2007 8:17] martin ziegert
I use mySQL 5.0.27
[8 Feb 2007 11:53] Valeriy Kravchuk
What OS do you use? Please, send also the exact URL you had used to download that binaries.
[8 Feb 2007 12:22] martin ziegert
Here are the OS and some other datas: 

In Serverinformation is writen I Use: 5.0.027
In Clientinformation stands:  5.1.11

Indeed I downloaded it as a complete Packet as a XAMPP  with MySQL 5.0.27. 

But I read the last days smoething about OS 86 - does this help you?
[8 Feb 2007 12:24] martin ziegert
The exactly Downloadd is this here:

http://www.apachefriends.org/de/xampp-windows.html
[8 Feb 2007 13:18] Valeriy Kravchuk
So, not MySQL's binaries... Please, send the results of

SHOW COLLATION LIKE 'utf%';

from your MySQL server. Send the exact version of Migration Toolkit used also.
[8 Feb 2007 21:49] martin ziegert
OK. I am using mysql-gui-tools-5.0-r9a-win32 as a migration tool and mySQL 5.0.27 anyhow, before I wasting time let me ask you one question. This Migration Toll can only migrate Tabelles from  Access to mySQL - not Views - right? 

It is so because ACCESS is nit realy SQL - is it like this? When Yes I will save a lott of Time anyhow - so thanks for an answer in advancee.
[10 Feb 2007 5:42] d d
I have the same problem.  OS windows XP home edition, MySQL 4.1.14 running on localhost, binary downloaded from apachefriends.org, xampp v 1.4.16.

Log output:
...
Schemata names retrieved successfully.
Initializing JDBC driver ... 
Driver class MySQL JDBC Driver 5.0
Opening connection ... 
Connection jdbc:mysql://localhost:3306/?user=PRIVATE&password=PRIVATE&useServerPrepStmts=false&characterEncoding=UTF-8
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)

Result of collation like ut as requested
mysql> SHOW COLLATION LIKE 'utf%';
+--------------------+---------+-----+---------+----------+---------+
| Collation          | Charset | Id  | Default | Compiled | Sortlen |
+--------------------+---------+-----+---------+----------+---------+
| utf8_general_ci    | utf8    |  33 | Yes     | Yes      |       1 |
| utf8_bin           | utf8    |  83 |         | Yes      |       1 |
| utf8_unicode_ci    | utf8    | 192 |         | Yes      |       8 |
| utf8_icelandic_ci  | utf8    | 193 |         | Yes      |       8 |
| utf8_latvian_ci    | utf8    | 194 |         | Yes      |       8 |
| utf8_romanian_ci   | utf8    | 195 |         | Yes      |       8 |
| utf8_slovenian_ci  | utf8    | 196 |         | Yes      |       8 |
| utf8_polish_ci     | utf8    | 197 |         | Yes      |       8 |
| utf8_estonian_ci   | utf8    | 198 |         | Yes      |       8 |
| utf8_spanish_ci    | utf8    | 199 |         | Yes      |       8 |
| utf8_swedish_ci    | utf8    | 200 |         | Yes      |       8 |
| utf8_turkish_ci    | utf8    | 201 |         | Yes      |       8 |
| utf8_czech_ci      | utf8    | 202 |         | Yes      |       8 |
| utf8_danish_ci     | utf8    | 203 |         | Yes      |       8 |
| utf8_lithuanian_ci | utf8    | 204 |         | Yes      |       8 |
| utf8_slovak_ci     | utf8    | 205 |         | Yes      |       8 |
| utf8_spanish2_ci   | utf8    | 206 |         | Yes      |       8 |
| utf8_roman_ci      | utf8    | 207 |         | Yes      |       8 |
| utf8_persian_ci    | utf8    | 208 |         | Yes      |       8 |
+--------------------+---------+-----+---------+----------+---------+
19 rows in set

mysql>
[10 Feb 2007 7:43] martin ziegert
Yes there is a problem but not solution because I dont know why Valeriy Kravchuk ask all the time what System, what Migratintool etc. I am using ... when you give the Order 'utf%' most of us should have the Same result. 

I thing the point is that you have to install this Connector / J ... maybe you need a TomCat or a J Boss for this purpose - I dont know.

But at least you can anyhow only migrate your tables from Access to mySQL. The Queries, I thing, you will not able to migrate. Well I asked this but I got no answer as I get no answers at all from Valeriy Kravchuk all I got had been questions which has probly nothing to do with my posting ... so maybe I give it up  and buy me a migration tool for money. 

Maybe you like to chek out this here, it seems the same like the mySQL migration tool: http://www.sqlmanager.net/de/products/mysql/datapump/buy
[13 Feb 2007 14:33] Valeriy Kravchuk
Martin,

I asked questions because I need to figure out what's wrong with MySQL in this case. I use MT almost every day (not for migrating data from Access, from Oracle or other MySQL server instead, but anyway...), and never seen error message like yours. The only difference in your case is that you (and "d d") use binaries from xampp, while I use MySQL's binaries (or the ones I built myself).

So, please, try to install MySQL's binaries of 5.0.27, in a default location, and use that database as migration target. You'll need 5 minutes for that. Inform about the results. They may help to understand where we should search for a bug.

I do not think this is a result of a bug in Migration Toolkit. I think, this problem is related to MySQL server/installation you use. Server refuses to "support" utf-8 for some reason. I may be wrong, though.
[13 Feb 2007 15:15] martin ziegert
Hi,

all done, all finde, it is as you said. I installed a new mySQL and it worked fine. But maybe you can help me with another question.

I loaded today this script:

	

mysql> GRANT ALL PRIVILEGES ON *.* TO javauser@localhost 
    ->   IDENTIFIED BY 'javadude' WITH GRANT OPTION;
mysql> create database javatest;
mysql> use javatest;
mysql> create table testdata (
    ->   id int not null auto_increment primary key,
    ->   foo varchar(25), 
    ->   bar int);

I fond tha on the apache fondation Site and thought that it will be Ok but now I can not anymore open my phpMyAdmin because I get this message:

Access denied for user 'pma'@'localhost' (using password: NO) 

Do you have a Tipp for me what I can do?
[15 Feb 2007 14:18] Valeriy Kravchuk
We're sorry, but the bug system is not the appropriate forum for asking help on using MySQL products. Your problem is not the result of a bug.

Support on using our products is available both free in our forums at http://forums.mysql.com/ and for a reasonable fee direct from our skilled support engineers at http://www.mysql.com/support/

Thank you for your interest in MySQL.
[24 Jul 2007 8:14] Daniel Rodriguez
Ok, I'm in the same situation. I think is a problem in xampp distribution.

Thanks for your help!
[8 Apr 2008 12:38] Marcelo Rodrigo Wiebbelling
I have same error in my migration toolkit connection in mysql from xampp distribution!