6

I get the error whenever I try to access the route created with valet home.test. I have tried all the solutions listed in similar issues like this solution but nothing seems to work

The error is:

SQLSTATE[HY000] [2054] The server requested authentication method 
unknown to the client (SQL: select * from `user_meta` where `user_id` is null limit 1)
MySQL version - 8.0.19
PHP version - 7.4.7

My migrations work fine as I can see the tables created.

Any help would be appreciated.

Update.env config

DB_CONNECTION=mysql

DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=home
DB_USERNAME=root
DB_PASSWORD=abcd

TENANCY_HOST=localhost
TENANCY_PORT=3306
TENANCY_DATABASE=home
TENANCY_USERNAME=root
TENANCY_PASSWORD=abcd
Bazinga_
  • 95
  • 1
  • 1
  • 5

2 Answers2

3

I guess this query solved your problem.

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
Senthurkumaran
  • 1,738
  • 2
  • 19
  • 29
3

You have to change MySQL settings. Edit /etc/mysql/mysql.conf.d/mysqld.cnf file and put this setting in mysqld section:

[mysqld]
default_authentication_plugin= mysql_native_password

Then run following command:

FLUSH PRIVILEGES;

Then you may need to restart the mysql services for the changes to take effect:

sudo service mysql restart