You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running php artisan migrate --seed I get this error.
If you like I can post the verbose output.
Illuminate\Database\QueryException : SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_schema.tables where table_schema = homestead and table_name = migrations)
at /root/PROJECTS_RAND/vue_demos/vue_blog_demo/laravue/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664
660| // If an exception occurs when attempting to run a query, we'll format the error
661| // message to include the bindings with SQL, which will make this exception a
662| // lot more helpful to the developer instead of just the database's errors.
663| catch (Exception $e) {
> 664| throw new QueryException(
665| $query, $this->prepareBindings($bindings), $e
666| );
667| }
668|
Exception trace:
1 PDOException::("SQLSTATE[HY000] [2002] Connection refused")
/root/PROJECTS_RAND/vue_demos/vue_blog_demo/laravue/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70
2 PDO::__construct("mysql:host=127.0.0.1;port=3306;dbname=homestead", "homestead", "secret", [])
/root/PROJECTS_RAND/vue_demos/vue_blog_demo/laravue/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70
This issue prevents me from logging into the dashboard with the developer account and presents as a (500) invalid server error.
I have changed DB_HOST=127.0.0.1 to DB_HOST=localhost in the .env file [1] but this did not resolve my issue.
The problem was that I was using the presets in .env and didn't read the comment properly # Migration and DB seeder (after changing your DB settings in .env)
Which lead me to assuming that the default settings should work.
I needed to change the line
DB_HOST=127.0.0.1 to DB_HOST=localhost, plus the following lines
DB_DATABASE=whatever db I want
DB_USERNAME=whatever username is set
DB_PASSWORD=password for db
Tooling Versions: FF quantum 68.0.1, npm 6.9.0, composer 1.9.0, Laravel Framework 5.8.13.
When running php artisan migrate --seed I get this error.
If you like I can post the verbose output.
This issue prevents me from logging into the dashboard with the developer account and presents as a (500) invalid server error.
I have changed DB_HOST=127.0.0.1 to DB_HOST=localhost in the .env file [1] but this did not resolve my issue.
[1] https://stackoverflow.com/questions/43804784/database-laravel-php-artisan-migrate-connection-refused
The text was updated successfully, but these errors were encountered: