二进制安装MySQL 5.7.17 重置root密码
来源:互联网 发布:免费远程培训软件 编辑:程序博客网 时间:2024/06/05 19:24
- 拷贝support-files/my-default.cnf到/etc/my.cnf
- vim 编辑/etc/my.cnf,尾部追加一行
skip-grant-tables - 重启MySQL服务
进入MySQL,重置密码
mysql -u root #进入MySQLupdate user set authentication_string=PASSWORD('newpass') where User='root' #5.7.6以上update user set password=PASSWORD('newpass') where User='root'; #5.7.5 之前
- 退出,删除在/etc/my.cnf尾部追加的内容(skip-grant-tables),保存退出,重启MSYQL服务
进入MSYQL,使用新密码登录
mysql -uroot -pmysql> SET PASSWORD = PASSWORD('your_new_password');# 否则在创建数据库的时候会报如下错误
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
PS:参考链接
https://www.skyf.org/reset-mysql579-root-password/
http://stackoverflow.com/questions/33467337/reset-mysql-root-password-using-alter-user-statement-after-install-on-mac
0 0
- 二进制安装MySQL 5.7.17 重置root密码
- MySQL 5.7重置root密码
- 重置MySQL ROOT密码
- mysql root密码重置
- mysql重置root密码
- mysql 重置root密码
- mysql重置root密码
- Mysql重置root密码
- 重置mysql root 密码
- 重置mysql root 密码
- 重置mysql root 密码
- mysql 重置root密码
- 重置mysql root密码
- mysql 重置 root 密码
- mysql重置root密码
- MySql重置root密码
- MySql重置root密码
- mysql重置root密码
- c++静态成员函数为什么不能为虚函数?
- 函数式中的Currying
- A guide to connecting Matlab with OpenCV
- Linux入门之内核管理番外篇(4)udev入门(1)
- Android图片打水印
- 二进制安装MySQL 5.7.17 重置root密码
- break使用不当引发的一个“血案”
- 在Ubuntu16.10下使用Live Wallpaper
- 第一天
- 关于AlertDialog.Builder犯的一个错和自定义布局的限制宽高一个知识点
- 路由器刷第三方固件,宽带免费提速
- 在C++中用虚函数的作用是什么?为什么要用到虚函数
- Spring中的依赖检查
- Python 中 strip函数