Bug #69376 MySQL to MySQL migration fails at wbcopytables
Submitted: 1 Jun 2013 14:39 Modified: 31 Jul 2013 15:07
Reporter: Charles Bailey Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Migration Severity:S2 (Serious)
Version:5.2.47 OS:MacOS (10.6.8)
Assigned to: CPU Architecture:Any

[1 Jun 2013 14:39] Charles Bailey
Description:
When attempting to migrate databases from local MySQL server to remote MySQL server, the migration assistant successfully uses stored connections for schema discovery and creation, but at the data copy step fails with the error:

Starting...
Prepare information for data copy...
Prepare information for data copy done
Determine number of rows to copy....
Counting number of rows in tables...
/Applications/MySQLWorkbench.app/Contents/MacOS/wbcopytables --count-only --passwords-from-stdin --mysql-source=db_user@:: --table `data_source` `datum_20110817` --table `data_augmented_001` `outcome_measures` --table `data_augmented_001` `demographics` --table `data_source` `person__20120317` --table `data_augmented_001` `med_rx_gaps` --table `data_augmented_001` `visit_clinical` --table `data_augmented_001` `person_clinical` --table `data_source` `visit02_clinipace_20110817` --table `data_source` `enroll02_clinipace_20110817` --table `data_augmented_001` `med_rx_intervals` --table `data_source` `datum_20120317` --table `data_source` `person__20110817`
Connecting to MySQL server using socket  with user db_user
12:54:10 [ERR][      copytable]: Failed opening connection to MySQL: Can't connect to local MySQL server through socket '' (2)
12:54:10 [ERR][      copytable]: Exception: mysql_real_connect: Can't connect to local MySQL server through socket '' (2)

ERROR: Determine number of rows to copy: Error getting row count from source tables
Failed

How to repeat:
1. Invoke Migration Wizard
2. Select local MySQL instance as source
3. Select other MySQL instance as target
4. Stored connection to local MySQL server uses default socket path
5. Proceed through construction of transfer

Suggested fix:
wbcopytables appears not to respect the 'socket' value in the '[client]' section of my.cnf.  Perhaps it should do so; if not, then Workbench may need to supply this default explicitly to wbcopytables.
[1 Jun 2013 15:11] MySQL Verification Team
Thank you for the bug report.

Starting...
Prepare information for data copy...
Prepare information for data copy done
Determine number of rows to copy....
Counting number of rows in tables...
/Applications/MySQLWorkbench.app/Contents/MacOS/wbcopytables --count-only --passwords-from-stdin --mysql-source=root@:: --table `contacts` `contacts` --table `contacts` `yesandno` --table `contacts` `phone`
Connecting to MySQL server using socket  with user root
12:02:44 [ERR][      copytable]: Failed opening connection to MySQL: Can't connect to local MySQL server through socket '' (2)
12:02:44 [ERR][      copytable]: Exception: mysql_real_connect: Can't connect to local MySQL server through socket '' (2)

ERROR: Determine number of rows to copy: Error getting row count from source tables
Failed
[31 Jul 2013 15:07] Philip Olson
Fixed as of MySQL Workbench 6.0.3, and here's the changelog entry:

Migrating a local MySQL server to a remote MySQL server would fail at the
data copy step, when a stored connection using the default socket path was
used.

Thank you for the bug report.