Bug #108037 Workbench cannot connect to a MySQL Server on Oracle Cloud - Student OCI account
Submitted: 29 Jul 23:39 Modified: 1 Sep 4:13
Reporter: Márcio Monteiro Email Updates:
Status: Analyzing Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:8.0.30 OS:Windows (Windows 10)
Assigned to: MySQL Verification Team CPU Architecture:Other (AMD)
Tags: acionou uma exceção, cannot connect to database, componente externo acionou uma exceção, connect to a MySQL Server, mysql error

[29 Jul 23:39] Márcio Monteiro
Description:
First things first, I do have MySQL Workbench working well on a Laptop computer after many setups that were needed to have Workbench connect to a MySQL Server on Oracle Cloud (Student account). It took roughly 2 weeks and now when I try the exact same settings from the PC Desktop it simply never connects to the server.

Oddly enough, when these errors were being displayed in the beginning, the mistakes could easily be solved (which I learned after 2 weeks), and now all settings are working on the Laptop, and again, this error message below persists even after I follow all the fixes and procedures which worked so well on the Laptop, with Windows 10 Single Language.

The error message is as follows: "Componente externo acionou uma exceção.

We are sorry for the inconvenience but an unexpected exception has been raised by one of the MySQL Workbench modules. In order to fix this issue we would kindly ask you to file a bug report. You can do that by pressing the [Report Bug] button below. 

Please make sure to include a detailed description of your actions that lead to this problem.

Thanks a lot for taking the time to help us improve MySQL Workbench!

The MySQL Workbench Team "

The issue also seems to be identifying what really makes this same error message be linked to an issue that was easily fixed with correct Cloud settings and Server grant setups, and then when the procedures are run on another machine in exactly the same way, the error is displayed as if there still were a problem (the previous problem which was dealt with and fixed it all on the Laptop). And that, even after Workbench is runnings well and connecting to the remote database without issues, on another machine (Laptop).

The steps that currently lead to the problem and error message are:

1 - a new connection is created with all the information required for an Oracle Cloud MySQL Server (Student account on OCI). The connection is configured to use SSH over TCP using a cloud VM and then to the MySQL Server;
2 - Through the mysqlsh under the Compute instance on the cloud, the server takes connections without trouble and does all the database is programmed to do, although there are technicalities with the Cloud specific restrictions for the cloud MySQL Server, but all is fine in that respect for it all is part of the specifications for this OCI Service.
3 - Using the ssh protocol connection over TCP by means of a tunnel connection works well on the Laptop, but not on the PC Desktop (Windows 10);
4 - When all fields for the new connection are entered and verified, the Test Connection button hits the Compute Instance (VM on the cloud), but after this dialog box (I confirm the connection to the VM) Workbench stops with this aforementioned error message;
5 - Uninstalling and reinstalling does not fix the issue;
6 - Upgrading the Workbench software does not help, the errors still persist;
7 - Trying to run Workbench without the Server software does not fix anything, either;
8 - Restarting Workbench or the OS does not make any difference, either. 
9 - If I run the mysqlsh utility, I am able to connect and perform database operations from within the Compute Instance - Virtual Machine, having connected to the MySQL Server remotely from that VM. My users on the server are allowed to connect and use the databases (mysqlsh), but the only user allowed to connect remotely with Workbench is "root";
10 - No other user is allowed (or made possible) a remote connection through Workbench on the Laptop, aside from root, which I later created for testing parameters and so forth. This account wound up being the only one which connects. 
11 - The MySQL Server service is created once with the administrator account of preference, but that account is not allowed remotely. 
12 - I cheched if other accounts well set up within the databases could connect, but none of them worked in Workbench. Up to now the only account which connects via Workbench is root, although the other accounts work fine through the mysqlsh utility.

How to repeat:
1 - a new connection is created with all the information required for an Oracle Cloud MySQL Server (Student account on OCI). The connection is configured to use SSH over TCP using a cloud VM and then to the MySQL Server;
2 - Through the mysqlsh under the Compute instance on the cloud, the server takes connections without trouble and does all the database is programmed to do, although there are technicalities with the Cloud specific restrictions for the cloud MySQL Server, but all is fine in that respect for it all is part of the specifications for this OCI Service.
3 - Using the ssh protocol connection over TCP by means of a tunnel connection works well on the Laptop, but not on the PC Desktop (Windows 10);
4 - When all fields for the new connection are entered and verified, the Test Connection button hits the Compute Instance (VM on the cloud), but after this dialog box (I confirm the connection to the VM) Workbench stops with this aforementioned error message;
5 - Uninstalling and reinstalling does not fix the issue;
6 - Upgrading the Workbench software does not help, the errors still persist;
7 - Trying to run Workbench without the Server software does not fix anything, either;
8 - Restarting Workbench or the OS does not make any difference, either. 
9 - If I run the mysqlsh utility, I am able to connect and perform database operations from within the Compute Instance - Virtual Machine, having connected to the MySQL Server remotely from that VM. My users on the server are allowed to connect and use the databases (mysqlsh), but the only user allowed to connect remotely with Workbench is "root";
10 - No other user is allowed (or made possible) a remote connection through Workbench on the Laptop, aside from root, which I later created for testing parameters and so forth. This account wound up being the only one which connects. 
11 - The MySQL Server service is created once with the administrator account of preference, but that account is not allowed remotely. 
12 - I cheched if other accounts well set up within the databases could connect, but none of them worked in Workbench. Up to now the only account which connects via Workbench is root, although the other accounts work fine through the mysqlsh utility.
[30 Jul 2:32] Márcio Monteiro
A screenshot of the error being displayed on Windows 10 (Workbench 8.0.30)

Attachment: Error message 29-07-2022.png (image/png, text), 177.92 KiB.

[30 Jul 2:37] Márcio Monteiro
Verified settings_working configurations of VCN and subnets, and DB users

Attachment: Verified settings_working configurations of VCN and subnets, and DB users.png (image/png, text), 56.33 KiB.

[30 Aug 12:58] MySQL Verification Team
Hello,

Thank you for the bug report.
Could you please try the workaround mentioned in Bug #101408? Please go through the last comment.

Regards,
Ashwini Patil
[31 Aug 1:41] Márcio Monteiro
Thanks for the advice, but I cannot change user names from within mysqlsh, I believe. What I could try again is a completely different new user, and see if it logs in. But I do think any user name without special unicode characters should have to work, which indeed I tried.

Can't there be any other reason for this? And even, on my PC Desktop I could never connect with the root user, either. And that was the only user allowed, but on the laptop.
There has to be a fix to this such tad issue, for in fact, why can a laptop connect and not the PC? Maybe, if anyone could verify, I should be thankful, if it isn't the case of low bandwidth on my PC Wireless Card. Could this be part of the problem?
Which bandwidth ought we ensure in order to connect? Is there more in the process other than authentication? NOTE: My MySQL DB is on OCI and I connect via a tunnel with SSH, from Workbench (both two latest versions as of the date of first posting)

Thank you again. I appreciate your efforts in helping with this.