-
Notifications
You must be signed in to change notification settings - Fork 99
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
caching_sha2_password support #102
Comments
Right now only way to bypass this is to use |
Thanks, could this maybe help: https://github.com/PyMySQL/PyMySQL/blob/main/pymysql/connections.py It looks like there are 2 functions based on the server response:
Also, I was looking how python-mysql-replication does it, but it looks like it is using PyMySQL directly and the _write_bytes function, so it doesn't need a separate socket to connect as a replica. I don't believe that PHP allows you to write to the socket directly with mysqli from what I was able to research. |
Right now I can execute query using sockets but parsing reponses to get data is a mess so I use mysql client for that. In future if I have more time I will program that. In tag 8.0 I added support for caching_sha2_password_auth |
Thanks for the updates. I'm getting an error now when using mysql_native_password. It seems to be trying caching_sha2_password even though my user is set for mysql_native_password:
|
hm I forgot that you can have auth with caching_sha2_password and password in old native mode I added auto switch mode in #105 check if this helps |
@krowinski - thanks for the quick updates. All is working great. My other reason for bringing up that PHP doesn't allow you to write to the socket directly is that I need to connect to MySQL over TLS. Is there a way to do that with php-mysql-replication? Right now, I'm looking at using proxysql in-between. Do you think PHP internals would be open to adding functions to mysqli to have direct access to the socket to read and write, so then php-mysql-replication wouldn't need to do a custom socket? I believe that is how python-mysql-replication works now with _write_bytes() and _read_packet(). Or is that something you have already tried? |
Just asking as I'm not sure how much is involved to do this:
I see it's noted that php-mysql-replication only supports mysql_native_password. Now that mysql_native_password is deprecated starting with MySQL 8.0.34, would it be possible to support caching_sha2_password?
Thanks for your help.
The text was updated successfully, but these errors were encountered: