Bug #69650 MySQL to MySQL migration fails at db_mysql_fe_grt.py", line 137, in connect
Submitted: 2 Jul 2013 16:24 Modified: 19 Nov 2013 19:27
Reporter: Hegy Pascal Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Migration Severity:S2 (Serious)
Version:6.0.3 OS:Windows (7 SP1 x64)
Assigned to: CPU Architecture:Any
Tags: db_mysql_fe_grt.py, DbMySQLFE.connect

[2 Jul 2013 16:24] Hegy Pascal
Description:
Hello,

I'm blocked at the "Fetch Schemata List" part when trying to migrate a MySQL 5.1 Server to another one MySQL 5.1.

Source Server is MySQL System using TCP/IP
Target Server is MySQL System using TCP/IP over SSH, and MySQL Hostname is 127.0.0.1

Both connections are valid

I've tested with 5.2.47 and 6.0.2, both are having the exactly same issue.

Here's the log:

Starting...

Connect to source DBMS...

- Connecting to source...

Connect to source DBMS done

Check target DBMS connection...

- Connecting to target...

Connecting to Mysql@127.0.0.1:3306@91.xxx.xx.xxx:22...

Traceback (most recent call last):

  File "C:\Program Files (x86)\MySQL\MySQL Workbench 6.0 CE\modules\db_mysql_fe_grt.py", line 137, in connect

    con.connect()

  File "C:\Program Files (x86)\MySQL\MySQL Workbench 6.0 CE\workbench\db_utils.py", line 196, in connect

    raise MySQLError(modules.DbMySQLQuery.lastError(), modules.DbMySQLQuery.lastErrorCode(), "%s@%s" % (self.connect_info.parameterValues["userName"], self.connect_info.parameterValues["hostName"]))

workbench.db_utils.MySQLError: Can't connect to MySQL server on '127.0.0.1' (10061) (code 2003)

Connecting to Mysql@127.0.0.1:3306@91.xxx.xx.xxx:22...

Traceback (most recent call last):

  File "C:\Program Files (x86)\MySQL\MySQL Workbench 6.0 CE\modules\db_mysql_fe_grt.py", line 137, in connect

    con.connect()

  File "C:\Program Files (x86)\MySQL\MySQL Workbench 6.0 CE\workbench\db_utils.py", line 196, in connect

    raise MySQLError(modules.DbMySQLQuery.lastError(), modules.DbMySQLQuery.lastErrorCode(), "%s@%s" % (self.connect_info.parameterValues["userName"], self.connect_info.parameterValues["hostName"]))

workbench.db_utils.MySQLError: Can't connect to MySQL server on '127.0.0.1' (10061) (code 2003)

Traceback (most recent call last):

  File "C:\Program Files (x86)\MySQL\MySQL Workbench 6.0 CE\workbench\wizard_progress_page_widget.py", line 66, in run

    self.func()

  File "C:\Program Files (x86)\MySQL\MySQL Workbench 6.0 CE\modules\migration_source_selection.py", line 450, in task_test_target

    raise e

SystemError: MySQLError("Can't connect to MySQL server on '127.0.0.1' (10061) (code 2003)"): error calling Python module function DbMySQLFE.connect

ERROR: Error during Check target DBMS connection: MySQLError("Can't connect to MySQL server on '127.0.0.1' (10061) (code 2003)"): error calling Python module function DbMySQLFE.connect

ERROR: Exception in task 'Check target DBMS connection': SystemError('MySQLError("Can\'t connect to MySQL server on \'127.0.0.1\' (10061) (code 2003)"): error calling Python module function DbMySQLFE.connect',)

Failed

How to repeat:
Start Workbench 6.0.2 (or 5.2.47)

Menu Database --> Migration Wizard

Select a valid MySQL stored connection using a Standard TCP/IP
Click "Test Connection", then "Next"
Select a valid MySQL stored connection using TCP/IP over SSH which has a 127.0.0.1 MySQL server inside.
Click Next.

and then it falls into error.
[10 Jul 2013 13:01] Hegy Pascal
Hello,

Having the same issue with recent 6.0.3 version.

Regards,
Hegy Pascal
[12 Jul 2013 15:27] Heiner Reinhardt
I am experiencing the same problem. 

The migration actually worked once. 

I tried different versions of the workbench (including 6.03, 5.2.42, 5.2.43, 5.2.47)
[22 Jul 2013 6:12] A O
I have the same problem - I also see several other bugs that share a similar case of using SSH to connect to MySQL as the TARGET connection. 

In my case I'm going from MSSQL (WIN) to MySQL (Linux). Clicking the "Test Connection" button works. but once you get to to "Connecting to target" part or "Check target DBMS connection" it fails. 

I think the common thread is MySQL over SSH connections for the target.
[22 Jul 2013 14:51] A O
I created a workaround by setting up an encrypted tunnel and doing MySQL target setup as if it was just a regular TCP (unencrypted) connection. It appears that the negotiated connection via the SSH component is the problem. I would hazzard a guess that the username USERNAME@127.0.0.1:3306@REMOTEIP:22 is not interpreted well by the program.
[23 Jul 2013 12:49] Hegy Pascal
Yeah that's a great idea :)
I will try this soon.
Thanks for the tip.

But I think this issue has to be fixed anyway. We are a lot who have this issue.

Rgds,
Pascal
[5 Aug 2013 18:23] Sergio Andres De La Cruz Rodriguez
Posted by developer:
 
Unfortunately, at this time we do not support source or target RDBMS connections through SSH. We are updating the error message to clearly state this. A workaround can be found in the comments by "A O" above.
[19 Nov 2013 19:27] Philip Olson
This is now documented:

+        The migration process does not support source or target RDBMS
+        connections through SSH.

+        A workaround is to set up an encrypted tunnel, and then use the
+        MySQL target as if it is a standard TCP (unencrypted)
+        connection.

Thank you for the bug report, and associated workaround.