Page 1 of 1

Connecting to MySQL 8

Posted: 11.11.2020, 17:07
by MJFShark
Hi All!

I'm using Zeoslib 8 and trying to connect to a new MySQL 8 test database on a remote Ubuntu server. I've got everything working the way I think it should, however whenever I try to connect to it I get the error:

SQL Error:
SSL connection error: unknown error number
Code: 2026 Message: Connect to "test" as user "mark"

I have require_secure_transport off on the server side. I'm trying to connect using "libmysql.dll" version 6.1.11.

I know this isn't a lot to go on, but any suggestions on getting this working would be appreciated. I'm wondering if I need a newer client dll.

-Mark

Re: Connecting to MySQL 8

Posted: 12.11.2020, 08:34
by aehimself
Hello Mark,

2026 seems to be an SSL-related error message:

https://forums.mysql.com/read.php?30,659272,659272
ERROR 2026 (HY000): SSL connection error: SSL is required but the server doesn't support it
Check whether you have valid certificates installed and if you have the options added in TZConnection to use SSL for the connection. I don't have SSL turned on on my database as it is not reachable from other network segments but you also can give libmariadb.dll a try to see if it is driver-related.

Re: Connecting to MySQL 8

Posted: 04.12.2020, 13:29
by MJFShark
I finally got back to this and got connected. I ended up having to turn off ssl (ssl=0 in mysqld.cnf) but I also had to change the "identified with" clause in create user to mysql_native_password (apparently migrated databases will have this as the default for existing users.) Looking at the MySQL connector docs for version 8 it appears that the C connector has been replaced with the c++ connector. What does that mean moving forward for MySQL and Zeoslib? I'd also be interested if anyone's been able to connect to MySQL 8 without needing the changes I made. Thanks!

-Mark

Re: Connecting to MySQL 8

Posted: 04.12.2020, 13:58
by aehimself
Use the MariaDB driver. That is being kept up to date and is fully compatible with MySQL.

Re: Connecting to MySQL 8

Posted: 04.12.2020, 17:26
by MJFShark
Aha! Thanks for pointing that out! After switching to the MariaDB connector and adding the MYSQL_PLUGIN_DIR property I was able to connect to MySQL 8 without needing to turn off ssl and without having to change the default plugin. Nice!

-Mark

Re: Connecting to MySQL 8

Posted: 04.12.2020, 21:16
by aehimself
Mark,

Glad it helped! I remember people having difficulties with SSL and libmysql.dll; most of them simply switched to MariaDB driver.
It also worths to note that Orace stopped compiling the 32 bit version; 64-bit is always included in the MySQL server. Download the community edition and extract the libmysql.dll file only: you just got yourself an up-to-date version.

Re: Connecting to MySQL 8

Posted: 20.01.2023, 14:47
by aehimself
Misread, nothing...