質問編集履歴

2

試したこと、について追記

2020/06/28 12:13

投稿

sasasa333
sasasa333

スコア1

test CHANGED
File without changes
test CHANGED
@@ -16,11 +16,19 @@
16
16
 
17
17
  ■試したこと
18
18
 
19
- 接続の際、「1045 : Access denied for user 'root'@'localhost' (using password: NO)」と表示されるので、rootユーザに「update root set authentication_string=password("変更するパスワード") where user='root';」でパスワードを設定を試みました。
19
+ 接続の際、「1045 : Access denied for user 'root'@'localhost' (using password: NO)」と表示されるので、rootユーザに「update user set authentication_string=password("変更するパスワード") where user='root';」でパスワードを設定を試みました。
20
20
 
21
21
 
22
22
 
23
+ すると、「ERROR 1146 (42S02): Table 'board.user' doesn't exist」と 表示され、パスワードを設定出来ません。SELECT文でユーザを確認すると、確かにuserというユーザはいないので、以下のコマンドを実行しました。
24
+
25
+
26
+
27
+ update root set authentication_string=password("変更するパスワード") where user='root';
28
+
29
+
30
+
23
- しかし、「ERROR 1146 (42S02): Table 'board.root' doesn't exist」と 表示され、パスワードを設定出来ません。
31
+ しかし、今度は「ERROR 1146 (42S02): Table 'board.root' doesn't exist」と 表示され、パスワードを設定出来ません。
24
32
 
25
33
 
26
34
 

1

追記欄を追加しました。

2020/06/28 12:13

投稿

sasasa333
sasasa333

スコア1

test CHANGED
File without changes
test CHANGED
@@ -25,3 +25,9 @@
25
25
 
26
26
 
27
27
  rootユーザなので、存在しないはずはないのですが、どのようにしたらパスワードを設定出来るでしょうか。
28
+
29
+
30
+
31
+ ■追記
32
+
33
+ 「use board;」でデータベースを選択してから実行しています。