jjdejong/phpip

Migrate scripts broken?

Closed this issue · 2 comments

srdco commented

Just updated ... git pull then composer install
When run php artisan serve receive following error:

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

  at /var/www/html/phpip-v2/vendor/laravel/framework/src/Illuminate/Database/Connection.php:669
    665|         // If an exception occurs when attempting to run a query, we'll format the error
    666|         // message to include the bindings with SQL, which will make this exception a
    667|         // lot more helpful to the developer instead of just the database's errors.
    668|         catch (Exception $e) {
  > 669|             throw new QueryException(
    670|                 $query, $this->prepareBindings($bindings), $e
    671|             );
    672|         }
    673| 

  Exception trace:

  1   Doctrine\DBAL\Driver\PDOException::("SQLSTATE[HY000] [1045] Access denied for user 'forge'@'localhost' (using password: NO)")
      /var/www/html/phpip-v2/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:31

  2   PDOException::("SQLSTATE[HY000] [1045] Access denied for user 'forge'@'localhost' (using password: NO)")
      /var/www/html/phpip-v2/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:27

  Please use the argument -v to see more details.

Not sure what the user "forge" is? ("my_table_name" is the name of the table, and is correct ... I just changed it to make it more generic when posting).

Hello,
Check that you have .env file to define your own database settings at the root of the application. You can copy .env.example to .env and edit it.
See https://github.com/jjdejong/phpip/wiki/Installing#12-phpip

srdco commented

That did it. I thought I had that already in the .env. Not sure why it was working before!