change authentication method of mysql database
im getting this error on my application mysqli_connect(): The server requested authentication method unknown to the client [caching_sha2_password] i never had this problem before is just happening in railway
8 Replies
Project ID:
f3475e58-a033-43d5-949d-e50612cc3675
f3475e58-a033-43d5-949d-e50612cc3675
your mysql client would need to be compatible with caching sha2 password, what is your mysql client?
https://www.php.net/manual/en/function.mysqli-connect.php
we have one php backend and uses this
its probably the version of php
its running in version 7.1
yep that's quite old
we cant update the php version i found this
https://stackoverflow.com/questions/50026939/php-mysqli-connect-authentication-method-unknown-to-the-client-caching-sha2-pa
Stack Overflow
php mysqli_connect: authentication method unknown to the client [ca...
I am using php mysqli_connect for login to a MySQL database (all on localhost)
<?php
//DEFINE ('DB_USER', 'user2');
//DEFINE ('DB_PASSWORD', 'pass2');
DEFINE ('DB_USER', 'user1');
DEFINE ('
should i try?
try updating the php version first