-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connecting to MySQL 8.0 requires non-default settings #264
Comments
MySQL 8.0 ships with:
DBD::mysql by default:
This results in the connection failing as the caching_sha2_plugin needs either SSL/TLS or RSA for the initial connection. Once the server has the entry in the cache secure connections are not required. What the user has to do is:
Option 3 is not secure as this allow a MitM attack. (attacker specifies its own pubkey) Other options: One thing to avoid is the situation where the defaults depends on too many variables (compile time option, server version, client version, MySQL vs. MariaDB). |
it seems that using mysql_get_server_pubkey=1 to connect to mysql 8.0 does not work, the error is: DBI->connect("DBI:mysql:database=$database;$host;$port;mysql_read_default_file=/etc/my.cnf", $user, $password) or die $DBI::errstr; |
I'm not sure why they |
Yes, I compile source code, following instructions on official website. almost these steps yum -y install perl-Test-Deep perl-Time-HiRes perl-DBD-MySQL MySQL version is 8.0.17 ldd /usr/local/lib64/perl5/auto/DBD/mysql/mysql.so |
The same here - mysql_get_server_pubkey=1 does not help, but mysql_ssl=1 (added to DSN line) does and connection establishes. DBI::VERSION=1.627 |
The However using SSL/TLS is more reliable as this only requires a client libarary and DBD::mysql that are SSL enabled, which should be true for more than 99.999% of the installations. |
|
Could you check if 58e017b fixes this for you? If not please create a separate issue. |
Thank you, |
Problems:
Either use TLS
Request public key of the server (not enable by default, MIM attack)
Try and connect, if get cert error message, handle, reconnect (hackish, pain to maintain)
caching SHA2 plugin
if make connection over TLS cache on server
Options:
** how to roll out without breaking?
** compile time option?
** dev release?
The text was updated successfully, but these errors were encountered: