R
Railway•10mo ago
yavuz

''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:
well pymysql 1.1.0 supports mysql >= 5.7 and railway is running mysql 8 and above, with no cpanel, i think youre fine
Jump to solution
52 Replies
Percy
Percy•10mo ago
Project ID: dba6cd6e-5ea1-494c-b77f-81377e24fbde
Brody
Brody•10mo ago
cPanel? tell me a bit more about your setup please
yavuz
yavuzOP•10mo ago
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
Brody
Brody•10mo ago
where does cPanel come into play here?
yavuz
yavuzOP•10mo ago
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...
yavuz
yavuzOP•10mo ago
We do not have cPanel here on railway right? I have seen the logs of my project and that is where it was
Brody
Brody•10mo ago
nope railway does not use cPanel for anything, if you have something hosted on cPanel you would need to go to them for support
yavuz
yavuzOP•10mo ago
But I have seen this here on railway logs Observability logs
Brody
Brody•10mo ago
what service is making those logs?
yavuz
yavuzOP•10mo ago
FastAPI app logs Now not anymore but it happened 4 hours ago and stopped now
Brody
Brody•10mo ago
is this what you are using? https://pypi.org/project/pymysql/
yavuz
yavuzOP•10mo ago
yes mysql+pymysql://
Brody
Brody•10mo ago
but is that the specfic package you are using?
yavuz
yavuzOP•10mo ago
I also connected to db from Mysql Workbanech *Mysql Workbench straight from my reqmnts text pymysql==1.1.0
Brody
Brody•10mo ago
where are you hosting your database?
yavuz
yavuzOP•10mo ago
here on railway I connect to it from my API but also from mysql workbench to change table structure sometimes
Brody
Brody•10mo ago
during those messages was your app experiencing any issues? instabilities?
yavuz
yavuzOP•10mo ago
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
Brody
Brody•10mo ago
well pymysql 1.1.0 supports mysql >= 5.7 and railway is running mysql 8 and above, with no cpanel, i think youre fine
yavuz
yavuzOP•10mo ago
ok Brody 🙂 thanks again 🙂
Brody
Brody•10mo ago
no problem, if you start to experience issues when that log is printed come back to this thread!
yavuz
yavuzOP•10mo ago
ok will do. thanks 🙂
Brody
Brody•10mo ago
no prob!
yavuz
yavuzOP•10mo ago
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 🙂
Brody
Brody•10mo ago
good to hear!
yavuz
yavuzOP•10mo ago
Unfortunately, this flooding is still going on.
No description
yavuz
yavuzOP•10mo ago
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'
Brody
Brody•10mo ago
run a query on your database
show variables like 'default_authentication_plugin';
show variables like 'default_authentication_plugin';
yavuz
yavuzOP•10mo ago
will do and report back thanks I did it from mysql workbench and the returned row was.. 'default_authentication_plugin', 'caching_sha2_password'
Brody
Brody•10mo ago
what version of mysql workbench are you using?
yavuz
yavuzOP•10mo ago
8.0.36 but I think it is coming from pymysql but I'm not 100% sure.
Brody
Brody•10mo ago
those are logs from the mysql service right?
yavuz
yavuzOP•10mo ago
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
yavuz
yavuzOP•10mo ago
yes, thaat is the one that everyone uses for mysql and python
Brody
Brody•10mo ago
please read the text in the screenshot
yavuz
yavuzOP•10mo ago
ok. will do and report back. unfortunately rsa is already installed. version 4.9 to be exact
Brody
Brody•10mo ago
if you redeployed your app would you see more of these warnings?
yavuz
yavuzOP•10mo ago
I did redeploy yesterday and the day before and it continues. are we using clusters and routers at railway for mysql?
yavuz
yavuzOP•10mo ago
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 ...
Brody
Brody•10mo ago
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
yavuz
yavuzOP•10mo ago
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'
Brody
Brody•10mo ago
then your backend isnt using caching_sha2_password
yavuz
yavuzOP•10mo ago
I don't know but connection string is the same for everyone. It should have sth to do with packaging.
Brody
Brody•10mo ago
not too sure what the connection string has to do with this?
yavuz
yavuzOP•10mo ago
that is where you initiate pymysql drivers
Brody
Brody•10mo ago
yes but i dont see how the string itself is applicable
yavuz
yavuzOP•10mo ago
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
yavuz
yavuzOP•10mo ago
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".
Brody
Brody•10mo ago
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
yavuz
yavuzOP•10mo ago
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 🙂
Brody
Brody•10mo ago
happy to help where I can
Want results from more Discord servers?
Add your server