Amazon lightsail strapi MySQL client does not support authentication protocol requested by server

30 Views Asked by At

I'm trying to get a strapi v4 Project running on lightsail. So far I've succeeded in installing strapi, setting up a mysql db and dumping my local db to the server. When trying to start strapi however, I'm getting the following exception:

ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client

According to several google results this can be changed by changing the auth method of the db user to legacy mode. But this has to be changed on the server if I'm getting this correctly. I cannot do this however for my lightsail instance.

Can anyone show me how I can achieve this and get my project running?

Greetz DeM

1

There are 1 best solutions below

0
derelektrischemoench On

So I finally figured it out myself; the problem seems to lie within the mysql package. So I just installed the mysql2 package which solved the problem. One caveat there though; when I uninstall the mysql-package the whole thing stops working. So you have to install both the mysql and the mysql2 package.