MySQLでクエリを書き始めたいです。
show grants ショー:
+--------------------------------------+
| Grants for @localhost |
+--------------------------------------+
| GRANT USAGE ON *.* TO ''@'localhost' |
+--------------------------------------+
私はユーザーIDを持っていませんが、ユーザーを作成したいのに特権を持っていない場合、ユーザーが1人もいない場合でも特権を作成する方法がわかりません!
mysql> CREATE USER 'parsa'@'localhost' IDENTIFIED BY 'parsa';
ERROR 1227 (42000): Access denied; you need (at least one of) the CREATE USER pr
ivilege(s) for this operation
ルートとしてサインインしようとしました:
mysql> mysql -u root -p;
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 'mysql
-u root -p' at line 1
mysql> mysql -u root -p root;
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 'mysql
-u root -p root' at line 1
mysql -u root -p。その後、データベースサーバーに対する完全な権限が付与され、他のユーザーを作成できます。


rootMySQLのインストール時に少なくとも作成されているはずです。