嗨我想玩弄MySQL數據庫,我不知道我應該如何去創建一個數據庫或表。我在網上衝浪了1個小時,特別是堆棧溢出,並嘗試了幾個解決方案,但最終只得到了低於錯誤的結果。我也忘了密碼。請幫助訪問被拒絕訪問MySQL數據庫的錯誤
無法使用命令create user'user1'@'localhost'創建新數據庫;
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.6.19 MySQL Community Server (GPL)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| test |
+--------------------+
2 rows in set (0.00 sec)
mysql> CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
ERROR 1227 (42000): Access denied; you need (at least one of) the CREATE USER pr
ivilege(s) for this operation
mysql>
mysql> create user 'user1'@'localhost';
ERROR 1227 (42000): Access denied; you need (at least one of) the CREATE USER privilege(s) for this operation
mysql>