I am trying to migrate a table to a database called kokodb in laravel. However, I keep getting this error :
SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client (SQL: select * from information_schema.tables where table_schema = kokodb and table_name = migrations)
This is my env file:
DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=kokodb
DB_USERNAME=*****
DB_PASSWORD=*****
and this is the database.php code:
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'kokodb'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', 'ZAQ!2wsx'),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'strict' => true,
'engine' => null,
What is the possible solution to this error?
xxxx
by editing your post. – nice_dev