mac下重置mysl8.0.11密码的方法
作者:source 时间:2024-01-28 06:27:50
mac下安装mysql8.0.11时 要求输入密码 之后想修改密码
注意 此方法适用于mac下的mysql8.0.11 其他版本不一定相同
1.启动mysql后正常登陆
2.查看sql中的root用户
select host, user, authentication_string, plugin from mysql.user;
+-----------+------------------+-------------------------------------------+-----------------------+
| host | user | authentication_string | plugin |
+-----------+------------------+-------------------------------------------+-----------------------+
| localhost | mysql.infoschema | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | mysql_native_password |
| localhost | mysql.session | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | mysql_native_password |
| localhost | mysql.sys | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | mysql_native_password |
| localhost | root | *23AE809DDACAF96AF0FD78ED04B6A265E05AA257 | mysql_native_password |
+-----------+------------------+-------------------------------------------+-----------------------+
4 rows in set (0.00 sec)
3.重置密码
语法格式
select host, user, authentication_string, plugin from user;
plugin 密码加密方式
authentication_string 加密后的密码
注意 mysql8.0以后废弃了PASSWORD函数 添加密码的时候不需要使用函数
清空root密码
update user set authentication_string='你的密码' where mysql.user='root';
4.测试
mysql -uroot -p你的密码
总结
以上所述是小编给大家介绍的mac下重置mysl8.0.11密码的方法网站的支持!
来源:https://segmentfault.com/a/1190000015417252
标签:mac,mysql,重置密码
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
SQL Server 中的数据类型隐式转换问题
2024-01-16 21:05:38
![](https://img.aspxhome.com/file/2023/8/119218_0s.png)
python用opencv批量截取图像指定区域的方法
2021-10-14 09:07:33
Python+Django+MySQL实现基于Web版的增删改查的示例代码
2023-11-20 02:09:06
![](https://img.aspxhome.com/file/2023/2/64252_0s.png)
ajax取消挂起请求的处理方法
2023-11-20 23:41:53
php中对象引用和复制实例分析
2023-10-20 23:05:02
python实现图片,视频人脸识别(dlib版)
2023-03-28 14:35:19
Python 模块EasyGui详细介绍
2022-04-27 22:55:39
python3使用SMTP发送简单文本邮件
2023-09-28 10:07:24
![](https://img.aspxhome.com/file/2023/0/109430_0s.jpg)
python没有gpu,如何改用cpu跑代码
2022-09-26 00:24:49
![](https://img.aspxhome.com/file/2023/7/101137_0s.png)
Python编程判断这天是这一年第几天的方法示例
2022-01-30 22:38:19
![](https://img.aspxhome.com/file/2023/8/89378_0s.jpg)
Navicat远程连接SQL Server并转换成MySQL步骤详解
2024-01-14 20:58:48
![](https://img.aspxhome.com/file/2023/4/72504_0s.png)
python 除法保留两位小数点的方法
2022-05-09 02:31:22
Python中如何自定义函数
2021-12-12 20:20:58
![](https://img.aspxhome.com/file/2023/2/84972_0s.png)
如何在SQL Server中由原子建立分子查询
2009-01-20 16:01:00
Python中logging日志的四个等级和使用
2023-05-10 14:57:41
![](https://img.aspxhome.com/file/2023/8/76688_0s.png)
Pandas数据结构中Series属性详解
2021-12-13 22:32:17
python使用xlsx和pandas处理Excel表格的操作步骤
2021-05-19 02:30:20
![](https://img.aspxhome.com/file/2023/1/81831_0s.jpg)
Advanced SQL Injection with MySQL
2024-01-24 18:09:24
![](https://img.aspxhome.com/file/2023/1/129891_0s.gif)
Selenium+BeautifulSoup+json获取Script标签内的json数据
2023-06-17 09:30:18
Asp WinHttp.WinHttpRequest.5.1 对象使用详解
2012-05-02 10:15:27