Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL Workbench SSL connection error: SSL is required but the server doesn't support it

Greetings I'm trying to connect with MySQL Workbench to localhost on Ubuntu 21.10 and I get this error "SSL connection error: SSL is required but the server doesn't support it" how can I fix it?

mysql-workbench

like image 682
Stefan Momcilovic Avatar asked Nov 03 '21 12:11

Stefan Momcilovic


People also ask

How do you fix SSL connection error SSL is required but the server doesn't support it?

right-click on the particular MySQL instance and select "Edit Connection" Select the "SSL" tab under Connection Method. Select the drop-down for the "Use SSL" and choose "If Available" instead of "Required". Click the "Test Connection" button at the lower right connection to make sure you can now connect without errors ...

How do I disable SSL requirement in MySQL Workbench?

mysql/workbench/connections. xml , look for the connection that you want to disable ssl, and find <value type="int" key="useSSL">2</value> set it to 0, that will disable ssl for that connection.

How do I create a SSL connection in MySQL Workbench?

Connecting to server using MySQL Workbench over SSL Configure MySQL Workbench to connect securely over SSL. From the Setup New Connection dialogue, navigate to the SSL tab. Update the Use SSL field to "Require". In the SSL CA File: field, enter the file location of the BaltimoreCyberTrustRoot.

How do I enable SSL on MySQL server?

Enable SSL Connections on MySQL Now, connect to the MySQL shell and check the status with the following command: mysql -u root -p --ssl-mode=required mysql> SHOW VARIABLES LIKE '%ssl%'; You should see that both have_openssl and have_ssl variables are now enabled.


Video Answer


4 Answers

This answer helped me in Workbench 8.0 https://dba.stackexchange.com/a/303329

Basically, create new connection using the advanced tab by entering "useSSL=0" in the 'Others' tab.

Advanced tab, then Others field

like image 81
Aldrin Jenson Avatar answered Oct 20 '22 23:10

Aldrin Jenson


Yes you can set "useSSL=0" in the 'Others' tab, but unfortunately when switch to another tab of MySQLWorkbench and then switch back, that setting is just disappeared... At least for me in version 8.0.27, on MacOS. And then sometimes later that annoying prompt is showing again, don't know why...

TO SOLVE this question once and for all, you better downgrade it to version 8.0.26 at this place: https://downloads.mysql.com/archives/workbench/, and the SSL options are all back, so you don't need to use "useSSL=0".

like image 27
Bleuuu Avatar answered Oct 20 '22 22:10

Bleuuu


Consider the following steps:

  1. Open MySQL workbench
  2. right-click on the particular MySQL instance and select "Edit Connection"
  3. Select the "SSL" tab under Connection Method
  4. Select the drop-down for the "Use SSL" and choose "If Available" instead of "Required".
  5. Click the "Test Connection" button at the lower right connection to make sure you can now connect without errors.

You need to downgrade to a lower workbench version here in order to see more options in the drop-down from step 4.

like image 3
gbieor Avatar answered Oct 20 '22 21:10

gbieor


one way to fix this is to go to /usr/share/mysql-workbench/modules/data/ and open the file mysql_rdbms_info.xml (in some cases there are two files with this name, but none of these exist you will find the following text).

Once inside the file, we will look for "2 | Require, 3 | Require and verify CA, 4 | Require and verify identity" and add "0 | No, 1 | If available" to the lines that do not contain this. Save the changes and then yes, follow these steps:

https://stackoverflow.com/a/69828778

like image 3
FanStyle Avatar answered Oct 20 '22 21:10

FanStyle