前提・実現したいこと
Laravelを初めて使う初心者です。
LaravelでDBとしてMySQLを用意しようとしています。
このサイトで順番通りやっていって最後のmigrateコマンドを実行しようとしたところエラーが発生して、先に進むことができません。
マイグレーションやシードのphpには誤字はない感じです。
発生している問題・エラーメッセージ
???は個人情報などのため伏せてます
Illuminate\Database\QueryException : SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_schema.tables where table_schema = demo-laravel-crud and table_name = migrations) at /Users/???????/men-??-front1/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") /Users/???????/men-??-front1/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:68 2 PDO::__construct("mysql:host=127.0.0.1;port=3306;dbname=demo-laravel-crud", "root", "", []) /Users/???????/men-??-front1/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:68 Please use the argument -v to see more details.
###ソースコード
APP_NAME=Laravel APP_ENV=local APP_KEY=base64:E+AY5kepInEkG6vfKqsHcHm/HHmzRD+D9MD9XPVPlQU= APP_DEBUG=true APP_URL=http://localhost LOG_CHANNEL=stack DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=demo-laravel-crud DB_USERNAME=root DB_PASSWORD= BROADCAST_DRIVER=log CACHE_DRIVER=file SESSION_DRIVER=file SESSION_LIFETIME=120 QUEUE_DRIVER=sync REDIS_HOST=127.0.0.1 REDIS_PASSWORD=null REDIS_PORT=6379 MAIL_DRIVER=smtp MAIL_HOST=smtp.mailtrap.io MAIL_PORT=2525 MAIL_USERNAME=null MAIL_PASSWORD=null MAIL_ENCRYPTION=null PUSHER_APP_ID= PUSHER_APP_KEY= PUSHER_APP_SECRET= PUSHER_APP_CLUSTER=mt1 MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}")
補足情報(FW/ツールのバージョンなど)
PHP 7.2.5 (cli) (built: Apr 26 2018 12:07:32) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.5, Copyright (c) 1999-2018, by Zend Technologies
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/05/28 03:20