Migrate laravel with mysql database

my local server is laragon
i changed below code of database.php
‘default’ => env(‘DB_CONNECTION’, ‘mysql’),

when in shell i type “php artisan migrate” its answer that

SQLSTATE[HY000] [1045] Access denied for user ‘homestead’@‘localhost’ (using passwo
rd: YES)

and its details of mysql

    'mysql' => [
        'driver'    => 'mysql',
        'host'      => env('DB_HOST', 'localhost'),
        'database'  => env('DB_DATABASE', 'forge'),
        'username'  => env('DB_USERNAME', 'forge'),
        'password'  => env('DB_PASSWORD', ''),
        'charset'   => 'utf8',
        'collation' => 'utf8_unicode_ci',
        'prefix'    => '',
        'strict'    => false,

what is the problem?

1 Like

The MySQL user that you’re using doesn’t have permission to connect to the database, check what permissions the user has for the database(s)

1 Like

i know my user havnt access but i dont know how to find user that have access,

my local server is laragon

Do you have access to PHPMyAdmin?

Are both the original and destination databases on the same server?

1 Like

thanks …problem is done,i logged in php my admin abd change user propertises on .env file

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.