MOTOSHARE 🚗🏍️

Rent Bikes & Cars Directly from Owners

Motoshare connects vehicle owners with people who need bikes and cars on rent. Owners earn from idle vehicles, and renters get flexible ride options.

Visit Motoshare

SQLSTATE[HY000] [1045] Access denied for user

Uncategorized

Error

[previous exception] [object] (PDOException(code: 1045): SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using
 password: YES) at /opt/lampp/htdocs/wizbrand/wz-account-admin-ms/vendor/laravel/framework/src/Illuminate/Database/Connectors/Co
nnector.php:70)
[stacktrace]


  Do you really wish to run this command? (yes/no) [no]
❯ yes


   Illuminate\Database\QueryException

  SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) (SQL: select * from information_schema.tables where table_schema = wz-account-admin-ms and table_name = migrations and table_type = 'BASE TABLE')

  at vendor/laravel/framework/src/Illuminate/Database/Connection.php:760
    756▕         // If an exception occurs when attempting to run a query, we'll format the error
    757▕         // message to include the bindings with SQL, which will make this exception a
    758▕         // lot more helpful to the developer instead of just the database's errors.
    759▕         catch (Exception $e) {
  ➜ 760▕             throw new QueryException(
    761▕                 $query, $this->prepareBindings($bindings), $e
    762▕             );
    763▕         }
    764▕     }

      +36 vendor frames
  37  artisan:35
      Illuminate\Foundation\Console\Kernel::handle()
[2023-04-01 06:45:36] production.ERROR: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) (
SQL: select * from information_schema.tables where table_schema = wz-account-admin-ms and table_name = migrations and table_type
 = 'BASE TABLE') {"exception":"[object] (Illuminate\\Database\\QueryException(code: 1045): SQLSTATE[HY000] [1045] Access denied
for user 'root'@'localhost' (using password: YES) (SQL: select * from information_schema.tables where table_schema = wz-account-
admin-ms and table_name = migrations and table_type = 'BASE TABLE') at /opt/lampp/htdocs/wizbrand/wz-account-admin-ms/vendor/lar
avel/framework/src/Illuminate/Database/Connection.php:760)
[stacktrace]

Solution

- Try delete next file: bootstap/cache/config.php
- cache and config clear 
- Make sure that user password if you are having "#" then put it in single quote.
0 0 votes
Article Rating
Subscribe
Notify of
guest

3 Comments
Oldest
Newest Most Voted
Nishant
Nishant
3 years ago

thank you so much this was savior

RJ_99
RJ_99
3 years ago

Awesome. this worked.

Anonimous
Anonimous
2 years ago

Perros del mal

3
0
Would love your thoughts, please comment.x
()
x