前提・実現したいこと
php artisan migrateが実行できテーブルが作成できていること
発生している問題・エラーメッセージ
laradock上でdocker-compose exec workspace bashでコンテナに入った後に
php artisan migrateを行うとエラーが出てしまう
該当ソースコード
root@50e07ab13383:/var/www# php artisan migrate In Connector.php line 67: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name o r service not known In Connector.php line 67: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: Name or s ervice not known
該当ソースコード2
root@50e07ab13383:/var/www# php artisan migrate In Connection.php line 664: SQLSTATE[HY000] [2054] The server requested authentication method unknown t o the client (SQL: select * from information_schema.tables where table_sche ma = default and table_name = migrations) In Connector.php line 67: SQLSTATE[HY000] [2054] The server requested authentication method unknown t o the client In Connector.php line 67: PDO::__construct(): The server requested authentication method unknown to t he client [caching_sha2_password]
.envファイル中身
DB_CONNECTION=mysql DB_HOST=mysqldb→mysql #編集 該当ソースコード2 DB_PORT=3306 DB_DATABASE=default DB_USERNAME=default DB_PASSWORD=secret
試したこと
mac os mojave10.14.5
環境はlaradock
回答1件
あなたの回答
tips
プレビュー