creativetimofficial / ct-material-dashboard-pro-laravel

Material Pro Dashboard For Laravel Framework 11.x and Up
https://www.creative-tim.com/live/material-dashboard-pro-laravel
19 stars 6 forks source link

PDO error Access denied for user #41

Closed marc64q closed 2 years ago

marc64q commented 2 years ago

Prerequisites

Please answer the following questions for yourself before submitting an issue.

Expected Behavior

Please describe the behavior you are expecting Access to dashboard

Current Behavior

What is the current behavior? PDO error

Failure Information (for bugs)

PDOException QueryException HTTP 500 Internal Server Error SQLSTATE[42000] [1044] Access denied for user 'webazrji_dev_pos'@'162.0.232.117' to database 'mage-pos-app' (SQL: select * from users where email = admin@black.com limit

Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.

Steps to Reproduce

Please go to https://mage-pos-app.webamazingapps.com/login Enter user and password : Username : admin@black.com, Password : secret Please provide detailed steps for reproducing the issue.

  1. https://mage-pos-app.webamazingapps.com/login
  2. Enter user and password
  3. Error is displayed : PDOException QueryException HTTP 500 Internal Server Error SQLSTATE[42000] [1044] Access denied for user 'webazrji_dev_pos'@'162.0.232.117' to database 'mage-pos-app' (SQL: select * from users where email = admin@black.com limit

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

I have :

  1. recreated the database
  2. recreated a database user
  3. linked the database user to the database

I have checked several time and the env. file config information are correct.

DB_CONNECTION=mysql DB_HOST=premium137.web-hosting.com DB_PORT=3306 DB_DATABASE=mage-pos-app DB_USERNAME=webazrji_dev_pos DB_PASSWORD=11S0EXdc83q@

Failure Logs

Please include any relevant log snippets or files here.

[2022-09-06 08:02:53] local.ERROR: SQLSTATE[42000] [1044] Access denied for user 'webazrji_dev_pos'@'162.0.232.117' to database 'mage-pos-app' (SQL: select from users where email = admin@black.com limit 1) {"exception":"[object] (Illuminate\Database\QueryException(code: 1044): SQLSTATE[42000] [1044] Access denied for user 'webazrji_dev_pos'@'162.0.232.117' to database 'mage-pos-app' (SQL: select from users where email = admin@black.com limit 1) at /home/webazrji/mage-pos-app/vendor/laravel/framework/src/Illuminate/Database/Connection.php:716)

Would appreciate your support, since I'm trying to solve this since nearly 3 hours...

Have a good day.

Cheers,

Marc

marc64q commented 2 years ago

Hi there,

I could solve the issue. The problem was, that I didn't integrate the prefix of the database...

Nothing wrong and no bug.

Cheers,

Marc