0

I can't solve Illuminate\Database\QueryException error when I run php artisan migrate for laravel project although I find many source on internet. I can't solve any answers with following Illuminate\Database\QueryException SQLSTATE[42000] and Artisan migrate error: Illuminate\Database\QueryException. Please answer me.

PHP Warning:  Module "pdo_mysql" is already loaded in Unknown on line 0

Warning: Module "pdo_mysql" is already loaded in Unknown on line 0     

   Illuminate\Database\QueryException 

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

  at C:\connectflutterlaravel\laravelbackend\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▕     }

  1   C:\connectflutterlaravel\laravelbackend\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:70
      PDOException::("SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO)")

  2   C:\connectflutterlaravel\laravelbackend\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:70
      PDO::__construct("mysql:host=127.0.0.1;port=3306;dbname=laravelbackend", "root", "", []) 

I found those 4 errors in C:\connectflutterlaravel\laravelbackend\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php enter image description here

KyawThu
  • 1
  • 2
  • 2
    Does this answer your question? [Module 'PDO' already loaded in Unknown on line 0 in laravel installation on ubuntu](https://stackoverflow.com/questions/37292272/module-pdo-already-loaded-in-unknown-on-line-0-in-laravel-installation-on-ubun) – N69S Dec 10 '22 at 10:27

0 Answers0