在給數據庫設置用戶時,
mysql> CREATE USER 'xxxx'@'localhost' IDENTIFIED BY 'xxxx'; Query OK, 0 rows affected (0.00 sec)//這是成功時候應出現的
結果輸入第一行之后產生如題所示錯誤:
ERROR 1290 (HY000):
The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
上網百度解決方案:
mysql> flush privileges; //直譯:更新權限
就ok了
附帶mysql的操作說明:
1.使用管理員權限打開命令提示符,步驟:開始菜單選擇Windows系統 - 命令提示符 - 在其上點擊右鍵選擇 - 更多 - 以管
理員身份運行。(Windows PowerShell)
PS C:\Windows\system32> net start mysql //輸入這句話啊 MySQL 服務正在啟動 . MySQL 服務無法啟動。
2.cd 轉到自己安裝mysql的路徑的bin目錄(試試“cd..”),比如
C:\MySQL\mysql-5.7.20-winx64\bin>
3.進入mysql(輸入密碼)
C:\MySQL\mysql-5.7.20-winx64\bin>mysqladmin -u root -p password
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.7.20 Copyright (c) 2000, 2017, 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>
就可以進行操作了
退出可以直接
mysql>exit
更具體的去看老師給的文檔