前提・実現したいこと
phpフレームワークlaravelを使ったで開発環境を作っています。
環境は以下になります。
webサーバー windows server 2016 IIS 10.0
言語 php7.2.12
DB mysql Ver 14.14 Distrib 5.5.16, for Win32 (x86)
フレームワーク laravel 5.7
発生している問題・エラーメッセージ
C:\inetpub\wwwroot\taro>php artisan migrate Illuminate\Database\QueryException : SQLSTATE[HY000] [2002] �Ώۂ̃R���s���[�^�[�ɂ���ċ��ۂ��ꂽ���߁A�ڑ��ł��܂���ł����B (SQL: select * from information_schema.tables where table_schema = taro and table_name = migrations) at C:\inetpub\wwwroot\taro\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] �Ώۂ̃R���s���[�^�[�ɂ���ċ��ۂ��ꂽ���߁A�ڑ��ł��܂���ł����B ") C:\inetpub\wwwroot\taro\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:70 2 PDO::__construct("mysql:host=localhost;port=3306;dbname=taro", "【伏せます①】", "【伏せます②】", []) C:\inetpub\wwwroot\taro\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:70 Please use the argument -v to see more details.
php
1DB接続の設定ファイル(.env)は以下のようにしてあります。 2DB_CONNECTION=mysql 3DB_HOST=localhost 4DB_PORT=3306 5DB_DATABASE=taro 6DB_USERNAME=【伏せます①】 7DB_PASSWORD=【伏せます②】 8DB_SOCKET= 9 10 11database.phpは↓ 12<?php 13 14return [ 15~略~ 16 'default' => env('DB_CONNECTION', 'mysql'), 17~略~ 18 'connections' => [ 19 20 'sqlite' => [ 21 'driver' => 'sqlite', 22 'database' => env('DB_DATABASE', database_path('database.sqlite')), 23 'prefix' => '', 24 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), 25 ], 26 27 'mysql' => [ 28 'driver' => 'mysql', 29 'host' => env('DB_HOST', 'localhost'), 30 'port' => env('DB_PORT', '3306'), 31 'database' => env('DB_DATABASE', ''), 32 'username' => env('DB_USERNAME', ''), 33 'password' => env('DB_PASSWORD', ''), 34 'unix_socket' => env('DB_SOCKET', ''), 35 'charset' => 'utf8mb4', 36 'collation' => 'utf8mb4_unicode_ci', 37 'prefix' => '', 38 'prefix_indexes' => true, 39 'strict' => true, 40 'engine' => null, 41 ], 42~略~
試したこと
環境構築にあたり、php artisan migrateを実行したところ上記のようなエラーが出ました。
migrationファイルはlaravelインストール時にデフォルトで入っていたもの
create_usertable.php
create_password_resets_table.php
になります。
文字化けの部分はlogファイルを見ると
[2018-11-16 00:29:26] local.ERROR: SQLSTATE[HY000] [2002] 対象のコンピューターによって拒否されたため、接続できませんでした。
(SQL: select * from information_schema.tables where table_schema = taro and table_name = migrations)
となっています。
mysqlは動いており、cmdでログインもできますし、taroテーブルも作成してあります。
文字化けの対応もしないといけませんが、まずはDBに接続できるようにしたいので解決方法分かる方おりましたらよろしくお願いします。

下記のような回答は推奨されていません。
このような回答には修正を依頼しましょう。
また依頼した内容が修正された場合は、修正依頼を取り消すようにしましょう。
2018/11/16 02:46
2018/11/16 10:05