TablePlus / TablePlus-Windows

TablePlus Windows issue tracker
https://tableplus.com
187 stars 3 forks source link

[Fatal bug] Unable to connect to MySQL Server 8.0.x on CentOS (Invalid SSL Error) #254

Closed tsukumijima closed 4 years ago

tsukumijima commented 4 years ago
  1. Which driver are you using and version of it (Ex: PostgreSQL 10.0):

CentOS MySQL 8.0.17 → 8.0.19

  1. Which TablePlus build number are you using (the number on the welcome screen, Ex: build 81):

Build 132

  1. The steps to reproduce this issue:

Set up VPS with CentOS 8.2 installed. Then install MySQL 8.0.x. (I wanted to specify a minor version, so I manually downloaded the .rpm package and installed it with "yum localinstall", but I don't think it's much different than installing normally)

After the installation, create a user on MySQL that can be accessed externally and open port 3306 to the outside world. Enter the IP address of your VPS in TablePlus for Windows and try to connect with the user you just created and their password. Unfortunately, I get an Error Invalid SSL message and cannot connect to the MySQL server.

Noted: If the bug is related to data, please attach an example SQL data.

I can't connect to MySQL itself in the first place...

557

Issue

Hello. I use TablePlus-Windows because I need to connect to a MySQL server in a school lesson. Recently, my school's MySQL server changed from 5.7.x to 8.0.x, so when I add a new server destination and connect, I get an "Error Invalid SSL" error. Unable to connect to MySQL server. Older MySQL 5.7.x servers can connect successfully.

I installed TablePlus-Mac on a MacBook and tried it in the same way. I was able to connect successfully. I also confirmed that the official MySQL client and DBeaver can connect successfully as well. Therefore, it is not considered that the MySQL Server itself is defective. Oddly enough, when I tried to connect to MySQL 8.0.20 on Ubuntu 18.04 LTS, I was able to connect successfully on both TablePlus-Windows and TablePlus-Mac.

The teacher said "MySQL server is 8.0.17 and running on CentOS". Therefore, as mentioned above, I set up a VPS (ConoHa VPS) server of CentOS 8.2 and built an environment (MySQL 8.0.17) that is almost the same as the MySQL server used for lessons at school. Unfortunately, I got the same "Invalid SSL" error. I tried updating my MySQL server to 8.0.19 and the results were the same.

Main points of the problem

Other

I use both Mac and Windows, so when I'm on Windows I'm using DBeaver instead of TablePlus. DBeaver is also powerful and not bad, but it works heavy and the UI is not very simple. If possible, I want to use my favorite TablePlus.

We haven't been able to verify it perfectly because we don't have the time or the technology, but it took a long time to determine the cause of the problem. Please fix this problem!

(I am Japanese and use Google Translate. The sentence may be unnatural)

huyphams commented 4 years ago

Hi @tsukumijima thank you for the feedback, I'm investigating it. Did you enable the TLS (SSL) on DBeaver?

tsukumijima commented 4 years ago

After installing DBeaver, I could add and connect to MySQL without any settings, so I didn't enable TLS/SSL myself. When I checked the connection settings, "Use SSL" was not checked. If you check "Use SSL", you will not be able to connect, and if you uncheck it, you will be able to connect (the other settings on the SSL tab are not changed). When connecting to MySQL on TablePlus-Mac, "MySQL 8.0.17 :TLS :(profile name)" is displayed in the upper bar. I have not changed the detailed settings for both MySQL Server and DBeaver (I am not a database expert, so I do not have the skill to make detailed settings).

…While writing this, I wondered "maybe...?", and changed the SSL mode of TablePlus-Windows connection settings from PREFERRED to DISABLED, and I was able to connect successfully! Why didn't you try it until now... I was able to connect, so there are no practical problems. However, I think this is a problem because TablePlus-Mac can connect even if SSLMode is PREFERRED.

Thank you.

huyphams commented 4 years ago

Thank @tsukumijima I think the bug is related to https://github.com/TablePlus/TablePlus-Windows/issues/253 with the old TLS version.

huyphams commented 4 years ago

Hi @tsukumijima please install this hotpatch: https://www.dropbox.com/s/eqztxlh2bai0lyd/TablePlusUpdate.exe?dl=0 and then change the SSL mode to PREFERRED TablePlus now supports TLS 1.2, please let me know if you're still seeing the issue.

tsukumijima commented 4 years ago

After installing hotpatch, I can connect normally even if I change SSL Mode to PREFERRED or REQUIRED! The top bar also says "TLS"! Thank you very much!