Chcę zacząć pisać zapytania w MySQL.
show grants przedstawia:
+--------------------------------------+
| Grants for @localhost |
+--------------------------------------+
| GRANT USAGE ON *.* TO ''@'localhost' |
+--------------------------------------+
Nie mam identyfikatora użytkownika, ale kiedy chcę utworzyć użytkownika, nie mam uprawnień, a także nie wiem, jak nadać uprawnienia, nawet jeśli nie mam jednego użytkownika!
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
Próbowałem zalogować się jako root:
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. Uruchamiając . Wtedy będziesz mieć pełne uprawnienia na serwerze bazy danych i możesz tworzyć innych użytkowników.


rootpowinien zostać utworzony podczas instalacji MySQL.