美文网首页
MySQL Error List

MySQL Error List

作者: xieyangxuejun | 来源:发表于2018-11-30 16:39 被阅读0次

问题汇总

更新mysql root密码

  • 在配置my.ini中设置skip-grant-tables
  • 进入命令行
> mysql
mysql> use mysql
Database changed
mysql> update mysql.user set authentication_string=password('root') where user='root';
Query OK, 1 row affected, 1 warning (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 1
  • 将之前修改my.ini删除
  • 使用管理员重新启动mysqld restart,如果是windows可以使用MySQL Notifier重启mysql数据库

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

首先,需要刷新一下权限管理

mysql> flush privileges;
# 然后在执行就行了
mysql> create user 'web'@'localhost' identified by 'xxx';

mysql> grant all on xinhua.* to 'web'@'localhost';
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
修改密码

mysql> alter user 'web'@'localhost' identified by 'web';

相关文章

网友评论

      本文标题:MySQL Error List

      本文链接:https://www.haomeiwen.com/subject/oqihcqtx.html