MySQL Error List

问题汇总

更新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';
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容