ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement


在给数据库设置用户时,

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

 

更具体的去看老师给的文档

 

 

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM