''mysql_native_password' is deprecated and will be removed in a future release warning
I've gotten quite a few of these warnings and now not anymore. What could be the reason? Is it related to pymsql drivers? I did not change any connection strings then it stopped. Full warning said " The mysql_native_password authentication plugin was deprecated in MySQL 8.0 in favor of the caching_sha2_password plugin, which cPanel doesn't yet support. The warning messages are designed to let system administrators know of the change. "
Does anybody have any idea?
Solution:Jump to solution
well pymysql 1.1.0 supports mysql >= 5.7 and railway is running mysql 8 and above, with no cpanel, i think youre fine
52 Replies
Project ID:
dba6cd6e-5ea1-494c-b77f-81377e24fbde
cPanel? tell me a bit more about your setup please
Project ID: dba6cd6e-5ea1-494c-b77f-81377e24fbde
I have a FastAPI with some endpoints. I have a Mysql db, connecting to it with pymysql driver and sqlalchemy
Yes I think it is cPanel
where does cPanel come into play here?
cPanel
MySQL log warning - ''mysql_native_password' is deprecated and will...
Symptoms
The MySQL log file is quickly filling with the following warning message.
2023-08-04T23:19:27.023454Z 20 [Warning] [MY-013360] [Server] Plugin mysql_native_password reported: ''mysql_nativ...
We do not have cPanel here on railway right? I have seen the logs of my project and that is where it was
nope railway does not use cPanel for anything, if you have something hosted on cPanel you would need to go to them for support
But I have seen this here on railway logs
Observability logs
what service is making those logs?
FastAPI app logs
Now not anymore but it happened 4 hours ago and stopped now
is this what you are using? https://pypi.org/project/pymysql/
yes
mysql+pymysql://
but is that the specfic package you are using?
I also connected to db from Mysql Workbanech
*Mysql Workbench
straight from my reqmnts text pymysql==1.1.0
where are you hosting your database?
here on railway
I connect to it from my API but also from mysql workbench to change table structure sometimes
during those messages was your app experiencing any issues? instabilities?
It may have since I dropped some tables and added modified ones and changed the api crud functions to match the database. However nobody was consuming api when I was doing it.
however since it said - The mysql_native_password authentication plugin was deprecated in MySQL 8.0 in favor of the caching_sha2_password plugin
So I was not sure what to make of it.
Everything works fine now and I do not know if my db changes were the reason
Solution
well pymysql 1.1.0 supports mysql >= 5.7 and railway is running mysql 8 and above, with no cpanel, i think youre fine
ok Brody 🙂 thanks again 🙂
no problem, if you start to experience issues when that log is printed come back to this thread!
ok will do. thanks 🙂
no prob!
Well, I've found the last log from 4hrs ago
2024-02-13T14:50:13.615555Z 263 [Warning] [MY-013360] [Server] Plugin mysql_native_password reported: ''mysql_native_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'
Mysql server logs from railway
Like I said it's fine now 🙂
good to hear!
Unfortunately, this flooding is still going on.
Exact message is ..
2024-02-14T18:52:18.742077Z 272 [Warning] [MY-013360] [Server] Plugin mysql_native_password reported: ''mysql_native_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'
run a query on your database
will do and report back thanks
I did it from mysql workbench and the returned row was..
'default_authentication_plugin', 'caching_sha2_password'
what version of mysql workbench are you using?
8.0.36
but I think it is coming from pymysql but I'm not 100% sure.
those are logs from the mysql service right?
you mean the screenshot above? They're from railway mysql
service
A lot of people talked about this after upgrade. A lot of info on the net about this with no solutions but to update. I guess pymysql needs to upgrade from 1.1 to 1.2 with a solution for this
yes, thaat is the one that everyone uses for mysql and python
please read the text in the screenshot
ok. will do and report back.
unfortunately rsa is already installed. version 4.9 to be exact
if you redeployed your app would you see more of these warnings?
I did redeploy yesterday and the day before and it continues.
are we using clusters and routers at railway for mysql?
Stack Overflow
mysql server log flooded with mysql_native_password deprecated warn...
I have multiple MySQL InnoDB Clusters running that are being used by mysqlrouter instances. A recent disk space warning showed that the mysql error log is getting flooded with the same error again ...
im asking if you get those warnings right when your app starts, aka when it connects to the database
nope, barebones mysql nothing special in the slightest
no, I don't think so. But I can test it. I thought it was fired when I logged into FastAPI from client app but I will doublecheck deploying, app or client app login
Yes it happens when I login from the client app to FastAPI. I just checked it and..
2024-02-15T07:51:26.534683Z 278 [Warning] [MY-013360] [Server] Plugin mysql_native_password reported: ''mysql_native_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'
then your backend isnt using caching_sha2_password
I don't know but connection string is the same for everyone. It should have sth to do with packaging.
not too sure what the connection string has to do with this?
that is where you initiate pymysql drivers
yes but i dont see how the string itself is applicable
I meant choosing the drivers with the con string. The rest is packages from requirements and I have rsa installed
mysql+pymysql://
So how am I going to change to caching_sha2_password
https://dev.mysql.com/doc/mysql-security-excerpt/8.0/en/sha256-pluggable-authentication.html#sha256-pluggable-authentication-installation
https://knowledge.broadcom.com/external/article/225475/broadcom-api-gateway-10-mysql-log-overf.html#wolken-h4
It says here that..
Cause
MySQL will deprecate sha256_password authentication method in future release and the vendor recommend to use caching_sha2_password instead.
The scenarios where warnings are recorded in the log are :
A DB user creation is executed using sha256_password authentication method
A remote or local connection attempt is done using a sha256_password authentication method
Generally speaking, by default, Gateway 10 Appliance do not use "sha256_password". In fact the default authentication plugin is "mysql_native_password" and all built-in Database's Users are set to use either that or "caching_sha2_password".
I honestly don't know, worst comes to worst, you have full control of the mysql version that's running so you could just pin it to a version that doesn't care if you are using the native password
right. I left it alone for now but I'll find a solution. pymysql drivers might be updated before mysql native pw is deprecated as well. Thanks Brody 🙂
happy to help where I can