Laravel5にて管理画面(CMS)を構築するにあたりlaravel-adminのことを知ったのでドキュメントを参考にコマンドを実行した際にエラーが返ってきました。
実行したコマンド及びエラーが以下になります。
bash
1[vagrant@localhost laravel]$ php artisan admin:install 2 3 Illuminate\Database\QueryException : SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO) (SQL: select * from information_schema.tables where table_schema = mysql and table_name = migrations) 4 5 at /var/www/html/laravel/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664 6 660| // If an exception occurs when attempting to run a query, we'll format the error 7 661| // message to include the bindings with SQL, which will make this exception a 8 662| // lot more helpful to the developer instead of just the database's errors. 9 663| catch (Exception $e) { 10 > 664| throw new QueryException( 11 665| $query, $this->prepareBindings($bindings), $e 12 666| ); 13 667| } 14 668| 15 16 Exception trace: 17 18 1 PDOException::("SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO)") 19 /var/www/html/laravel/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:68 20 21 2 PDO::__construct("mysql:host=127.0.0.1;port=3306;dbname=mysql", "root", "", []) 22 /var/www/html/laravel/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:68 23 24 Please use the argument -v to see more details.
また、エラーの内容に沿ってこちらを一通り試してみましたが解消されませんでしたので質問させて頂いた次第です。
解決方法が分かる方がいましたらご教示の程、宜しくお願いします。
追記:データベースの設定を変更したところエラーが以下に変わりました。
bash
1[vagrant@localhost laravel]$ php artisan admin:install 2Nothing to migrate. 3 4 Illuminate\Database\QueryException : SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mysql.administrators' doesn't exist (SQL: select count(*) as aggregate from `administrators`) 5 6 at /var/www/html/laravel/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664 7 660| // If an exception occurs when attempting to run a query, we'll format the error 8 661| // message to include the bindings with SQL, which will make this exception a 9 662| // lot more helpful to the developer instead of just the database's errors. 10 663| catch (Exception $e) { 11 > 664| throw new QueryException( 12 665| $query, $this->prepareBindings($bindings), $e 13 666| ); 14 667| } 15 668| 16 17 Exception trace: 18 19 1 PDOException::("SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mysql.administrators' doesn't exist") 20 /var/www/html/laravel/vendor/laravel/framework/src/Illuminate/Database/Connection.php:326 21 22 2 PDO::prepare("select count(*) as aggregate from `administrators`") 23 /var/www/html/laravel/vendor/laravel/framework/src/Illuminate/Database/Connection.php:326 24 25 Please use the argument -v to see more details.
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/04/14 07:18
2018/04/14 07:56 編集
2018/04/14 15:06
2018/04/16 11:05