When I run php artisan migrate
In Connection.php line 664:
SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client (SQL: select * from information_schema.tables where table_schema = aviandb and table_name = migrations)
In Connector.php line 68:
SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client
In Connector.php line 68:
PDO::__construct(): The server requested authentication method unknown to the client [caching_sha2_password]
How can I solve?
php artisan migrate publishes all our schema to the database. This command also creates the table in the database. php artisan migrate:status checks the status of the migration. migrate:status checks the migrations we have run.
By default, php artisan migrate:rollback will rollback all of your database migrations. By specifying --step=1 , you're saying that you only want to rollback the latest database migration. Plus, if you change the number, e.g. into --step=2 , you're telling Laravel to only rollback the last two migrations.
To create a new migration, you can run the make:migration Artisan command and that will bootstrap a new class on your Laravel application, in the database/migrations folder. This class will contain a default boilerplate code.
Migrations are like version control for your database, allowing a team to easily modify and share the application's database schema. Migrations are typically paired with Laravel's schema builder to easily build your application's database schema.
Your php mysql extension doesn't support the version of MySQL server you are running.
I'm assuming you're running MySQL 8.0, which is new at the time of this post.
You need to update or rebuild PHP with support for the latest version of MySQL, or downgrade your MySQL Server version.
Another solution is to create a user with the mysql_native_password option.
CREATE USER 'user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'yourpassword';
GRANT ALL PRIVILEGES ON *.* TO 'user'@'localhost' WITH GRANT OPTION;
Run this script on your query mysql and just your new password it will be work
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your_new_password'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With