Bug #110517 Misuse of wbcopytables.exe in migration wizard
Submitted: 27 Mar 2023 20:34 Modified: 3 May 2023 9:37
Reporter: Pat Sam Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Workbench: Migration Severity:S3 (Non-critical)
Version:8.0.28 OS:Windows
Assigned to: CPU Architecture:Any

[27 Mar 2023 20:34] Pat Sam
Description:
At the "Bulk Data Transfer" stage:

wbcopytables.exe --count-only --passwords-from-stdin --mysql-source="<some-src>" --source-rdbms-type=Mysql --source-timeout= --target-timeout=None --table-file=C:\Users\Patrick\AppData\Local\Temp\tmpmoy0r8a_
[INF][      copytable]: Connecting to MySQL server at <some-src> with user <some-user>
[INF][      copytable]: Connection to MySQL opened
734371 total rows in 20 tables need to be copied:
...
Migrating data...
wbcopytables.exe --mysql-source="<some-src>" --source-rdbms-type=Mysql --target="root@localhost:3306" --progress --passwords-from-stdin --thread-count=2 --source-timeout= --target-timeout=None --table-file=C:\Users\Patrick\AppData\Local\Temp\tmpvfgwf3bq
...
[INF][      copytable]: Connecting to MySQL server at localhost:3306 with user root
[ERR][      copytable]: Failed opening connection to MySQL: Access denied for user 'root'@'localhost' (using password: NO)
[ERR][      copytable]: Exception: mysql_real_connect: Access denied for user 'root'@'localhost' (using password: NO)

There is a password for the user root - correctly used for the creation of the schema and tables, for example - that is missing here.

How to repeat:
I succeeded by executing the command manually in a terminal, with these two additional options:
 --source-password="<some-pwd1>"
 --target-password="<some-pwd2>"

[INF][      copytable]: Connecting to MySQL server at localhost:3306 with user root
[INF][      copytable]: Connection to MySQL opened
[INF][      copytable]: Connecting to MySQL server at <some-src> with user <some-user>
[INF][      copytable]: Connection to MySQL opened
...
FINISHED

Note 1: It probably would work as well with the password added in the connstring.

Note 2: Oddly, "C:\Program Files\MySQL\MySQL Workbench 8.0\wbcopytables.exe" --help  doesn't show these options:
--source-rdbms-type
--passwords-from-stdin
--source-timeout
--target-timeout
[6 Apr 2023 12:16] MySQL Verification Team
Hello Pat Sam,

Thank you for the bug report.
Could you please let us know source and target RDBMS along with SQL script(please make it as private if you prefer) to create and try migration at our end?

Regards,
Ashwini Patil
[6 Apr 2023 12:44] Pat Sam
The target is simply standard localhost.
The source is private, I can't publish it ; its pattern is:
--mysql-source="<some-uuid>-mysql.services.clever-cloud.com:20753"
[11 Apr 2023 12:39] MySQL Verification Team
Hello Pat Sam,

Thank you for the details.
I tried to reproduce your issue on windows 10 with workbench 8.0.32 using migration wizard but I am not seeing any issues at my end. Please check the password and try again.
Also, Please upgrade to MySQL workbench 8.0.32. Thanks.

Regards,
Ashwini Patil
[11 Apr 2023 12:39] MySQL Verification Team
8.0.32 test results

Attachment: 110517_test_results.PNG (image/png, text), 248.53 KiB.

[3 May 2023 9:37] Pat Sam
I updated to version 8.0.33.
I can't reproduce the problem.

But, navigating with back and next buttons to experiment some variations, at one time I saw again a denial because of a lack of password for the target connection. It was not on the final step but somewhere in the OBJECT MIGRATION section. I didn't keep a trace, and I solved the failure just by walking up to  the "target selection" step and down again, something like a refresh/re-sync.
So, there may be still something wrong, not obvious to reproduce.