I've set up a new project in Laravel 8 (I've fairly new to Laravel) and done the following:
- Created a DB called 'firstproject'
- Installed Laravel and run
php artisan ui:auth
- Update my .env file
- When I run
php artisan migrate
I get the following error:
Illuminate\Database\QueryException
SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client (SQL: select * from information_schema.tables where table_schema = firstproject and table_name = migrations and table_type = 'BASE TABLE')
at vendor/laravel/framework/src/Illuminate/Database/Connection.php:671
667▕ // If an exception occurs when attempting to run a query, we'll format the error
668▕ // message to include the bindings with SQL, which will make this exception a
669▕ // lot more helpful to the developer instead of just the database's errors.
670▕ catch (Exception $e) {
➜ 671▕ throw new QueryException(
672▕ $query, $this->prepareBindings($bindings), $e
673▕ );
674▕ }
675▕
+33 vendor frames
34 artisan:37
Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
My .env file has the following:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=firstproject
DB_USERNAME=root
DB_PASSWORD=/* Password here */
I'm struggling to get past this issue and would greatly appreciate any help.
Thanks in advance