Bug #93908 Generic RDBMS - ODBC (direct connection string): PWD parameter ignored
Submitted: 14 Jan 2019 6:37 Modified: 14 Jan 2019 7:35
Reporter: Sam Hall Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench: Migration Severity:S3 (Non-critical)
Version:8.0.13 OS:Any
Assigned to: CPU Architecture:Any

[14 Jan 2019 6:37] Sam Hall
Description:
I'm attempting to supply a full ODBC string including the password, via the PWD parameter. Specifically... "DSN=MyOraDSN;UID=USERNAME;PWD=PASSWORD;"

When using this as my "Source DBMS" during a Migration, this fails to connect. By looking at the log message it appears that Workbench is aware of the PWD parameter entered by the user and seems to remove or tamper with it (at least it does so in the logs in order to sanitise the password from the output).

I'm aware that the generic response to anyone attempting to connect to an Oracle source database is to close the bug as "unsupported". However, my issue is specifically with my suspicion that the ODBC string is tampered with, in such a way that I now have no way to proceed with a connection to this particular "Generic RDBMS" via ODBC. The ODBC string option is an advanced feature that should give me the ability to fully control the ODBC connection. Sanitise the logs by all means, but please don't strip the password from the string when establishing the ODBC connection.

How to repeat:
1. Setup an Oracle DSN named "MyOraDSN".
2. Start a migration via MySQL Workbench
3. Configure a source Generic RDBMS using ODBC (direct connection string) configured with "DSN=MyOraDSN;UID=USERNAME;PWD=PASSWORD;"
4. Target can be any MySQL database
5. Note that on the "Fetch Schemas List" page you get 'grt.Dict key must be a string' error and the following log message...

Starting...
Connect to source DBMS...
- Connecting to source...
Connecting to generic@DRIVER=%driver%;SERVER=%hostName%;PORT=%port%...
Opening ODBC connection to DSN=ATLASCLN;UID=USERNAME;PWD=XXXX;...
Traceback (most recent call last):
  File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\db_generic_re_grt.py", line 693, in connect
    return GenericReverseEngineering.connect(connection, password)
  File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\db_generic_re_grt.py", line 147, in connect
    con = db_driver.connect(connection, password)
  File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\workbench\db_driver.py", line 95, in connect
    connection = library.connect(connection_string, password=password)
pyodbc.Error: ('28000', '[28000] [Oracle][ODBC][Ora]ORA-01005: null password given; logon denied\n (1005) (SQLDriverConnect); [28000] [Oracle][ODBC][Ora]ORA-01005: null password given; logon denied\n (1005)')

Traceback (most recent call last):
  File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\workbench\wizard_progress_page_widget.py", line 70, in run
    self.func()
  File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\migration_source_selection.py", line 454, in task_connect
    username = self.main.plan.migrationSource.connection.parameterValues.userName
KeyError: 'grt.Dict key must be a string'
ERROR: Error during Connect to source DBMS: 'grt.Dict key must be a string'
ERROR: Exception in task 'Connect to source DBMS': KeyError('grt.Dict key must be a string',)

Failed

Suggested fix:
When establishing an ODBC connection for "ODBC (direct connection string)", please maintain the exact ODBC connection string entered by the user in the Source Selection screen.
[14 Jan 2019 7:33] MySQL Verification Team
Thank you for the bug report. Migration from Oracle isn't supported.
[14 Jan 2019 7:33] MySQL Verification Team
Thank you for the bug report. Migration from Oracle isn't supported.
[14 Jan 2019 7:35] MySQL Verification Team
Duplicate of: https://bugs.mysql.com/bug.php?id=66609.
[14 Mar 2019 21:46] Travis Barker
I have the same Unhandeled exception with latest workbench attempting connection to Access database.
[14 Mar 2019 21:47] Travis Barker
see error with Access selected

Attachment: Capture.PNG (image/png, text), 22.95 KiB.

[25 May 2020 3:55] Jairo Suarez
The description comments exactly the same scenario with MySQL Workbench, my current version 8.0.19.

Test connection from ODBC Data Source Administrator (64Bit) is successful.

Attempting to connect to database PHALOrders_MigrationTest on host
 its-server01...

Database version: FileMaker 17.0.2

Encryption: AES256-GCM-SHA384 TLSv1.2

SSL Certificate: /C=UU/ST=Otago/L=xxxxxx/OU=ITS I and A/O=SomeWhere /CN=its-server01

Test completed successfully.

But when I go to Workbench. Pop-up this error.

15:54:25 [ERR][       pymforms]: Unhandled exception in Python code: 
Traceback (most recent call last):
  File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\migration_source_selection.py", line 330, in go_advanced
    self.test_connection(self.main.plan.migrationSource, "Source")
  File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\migration_source_selection.py", line 255, in test_connection
    username = source.connection.parameterValues.userName
KeyError: grt.Dict key must be a string
[12 Jun 2020 21:09] David FU
More than a year and a half later and this is not fixed.

Forget oracle being the source. This breaks ALL ODBC sources even those that are supported.
[27 Jan 2021 15:21] Vladimir Hidalgo
Hi, I found this issue today, should we expect this to be fixed or is Workbench an abandoned product after the transition to Oracle?