teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

データベースの設定変更によるエラーの更新

2018/04/14 07:21

投稿

medroid
medroid

スコア17

title CHANGED
File without changes
body CHANGED
@@ -1,7 +1,7 @@
1
1
  Laravel5にて管理画面(CMS)を構築するにあたりlaravel-adminのことを知ったので[ドキュメント](http://laravel-admin.org/docs/#/)を参考にコマンドを実行した際にエラーが返ってきました。
2
2
  実行したコマンド及びエラーが以下になります。
3
3
 
4
- ```
4
+ ```bash
5
5
  [vagrant@localhost laravel]$ php artisan admin:install
6
6
 
7
7
  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)
@@ -29,4 +29,34 @@
29
29
  ```
30
30
 
31
31
  また、エラーの内容に沿って[こちら](https://stackoverflow.com/questions/28644344/access-denied-for-user-homesteadlocalhost-in-laravel-5)を一通り試してみましたが解消されませんでしたので質問させて頂いた次第です。
32
- 解決方法が分かる方がいましたらご教示の程、宜しくお願いします。
32
+ 解決方法が分かる方がいましたらご教示の程、宜しくお願いします。
33
+
34
+
35
+ 追記:データベースの設定を変更したところエラーが以下に変わりました。
36
+ ```bash
37
+ [vagrant@localhost laravel]$ php artisan admin:install
38
+ Nothing to migrate.
39
+
40
+ 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`)
41
+
42
+ at /var/www/html/laravel/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664
43
+ 660| // If an exception occurs when attempting to run a query, we'll format the error
44
+ 661| // message to include the bindings with SQL, which will make this exception a
45
+ 662| // lot more helpful to the developer instead of just the database's errors.
46
+ 663| catch (Exception $e) {
47
+ > 664| throw new QueryException(
48
+ 665| $query, $this->prepareBindings($bindings), $e
49
+ 666| );
50
+ 667| }
51
+ 668|
52
+
53
+ Exception trace:
54
+
55
+ 1 PDOException::("SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mysql.administrators' doesn't exist")
56
+ /var/www/html/laravel/vendor/laravel/framework/src/Illuminate/Database/Connection.php:326
57
+
58
+ 2 PDO::prepare("select count(*) as aggregate from `administrators`")
59
+ /var/www/html/laravel/vendor/laravel/framework/src/Illuminate/Database/Connection.php:326
60
+
61
+ Please use the argument -v to see more details.
62
+ ```