为什么迁移数据库不能在laravel中工作?

I am new with laravel and I want to migrate the table first I change .env information (database name, password,user name)and I made the model and write the proprieties but when I write the command php artisan migrate the tables did not appear in my phpmyadmin database and the following error appears:

SQLSTATE[HY000] [1044] Access denied for user ''@'localhost' to database 'forge' 
(SQL: select * from information_schema.tables where table_schema = forge and 
table_name = migrations and table_type = 'BASE TABLE') catch (Exception $e) {
 > 664| throw new QueryException( 665| $query, $this->prepareBindings($bindings), 
$e 666| ); 667| } ...

Make sure you are running command in desire project. Have you created migration file for your model by

php artisan make:migration create_model_name

Update the column in migration file and then run

php artisan migrate

If you run your project by php artisan serve turn it off and run it again. If not you need to check your credentials to your mysql

Make sure you create a blank database before running the migration.

I suggest you create new user and password in your sql and
GRANT ALL on <'name_of_your_database'>

Then update your .env file same as your database user credentials and migrate it.

try this:

  1. composer du.
  2. php artisan make:migration create_model_table.
  3. php artisan migrate.
    you must be sure that you entered the right db credintials.