質問編集履歴

1

権限の付与はできるようになりました

2020/11/25 23:52

投稿

Take.Y
Take.Y

スコア12

test CHANGED
File without changes
test CHANGED
@@ -36,17 +36,59 @@
36
36
 
37
37
  ④権限の付与
38
38
 
39
- ```
40
39
 
40
+
41
- GRANT ALL PRIVILEGES ON *.* TO 'dbuser'@'localhost' IDENTIFIED BY '*********' WITH GRANT OPTION;
41
+ ユーザーの作成、確認まで行権限の付与も完了していますが、特に変化なし。
42
+
43
+
44
+
45
+
42
46
 
43
47
  ```
44
48
 
45
- →下記のようなエラー
49
+ mysql> SELECT Host, User FROM mysql.user;
46
50
 
47
- ```
51
+ +-----------+------------------+
48
52
 
49
- ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTIFIED BY '*********' WITH GRANT OPTION' at line 1
53
+ | Host | User |
54
+
55
+ +-----------+------------------+
56
+
57
+ | % | testuser |
58
+
59
+ | localhost | mysql.infoschema |
60
+
61
+ | localhost | mysql.session |
62
+
63
+ | localhost | mysql.sys |
64
+
65
+ | localhost | root |
66
+
67
+ +-----------+------------------+
68
+
69
+ 5 rows in set (0.00 sec)
70
+
71
+
72
+
73
+ mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION;
74
+
75
+ Query OK, 0 rows affected (0.00 sec)
76
+
77
+
78
+
79
+ mysql> FLUSH PRIVILEGES;
80
+
81
+ Query OK, 0 rows affected (0.00 sec)
82
+
83
+
84
+
85
+ mysql> CREATE DATABASE DictationManager;
86
+
87
+ ERROR 3680 (HY000): Failed to create schema directory 'DictationManager' (errno: 2 - No such file or directory)
88
+
89
+ mysql> create database DictationManager;
90
+
91
+ ERROR 3680 (HY000): Failed to create schema directory 'DictationManager' (errno: 2 - No such file or directory)
50
92
 
51
93
  ```
52
94