十五、mac 中登陆mysql忘记密码解决办法
1、打开终端,输入命令:cd /usr/local/mysql/bin
2、mysql -uroot -p,用这条命令登陆时报错信息:
报错:Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
3、打开终端输入:sudo mysqld_safe --skip-grant-tables
输出
Password:
Logging to '/usr/local/mysql/data/localhost.err'.
2018-10-10T03:21:40.6NZ mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
4、打开一个新的终端,输入:mysql -u root ,会看到以下输出。
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 16
Server version: 5.7.23 MySQL Community Server (GPL) Copyright (c) 2000, 2018, 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>
5、终端输入 use mysql显示如下
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A Database changed
6、修改密码:UPDATE mysql.user SET authentication_string=PASSWORD('你的密码') WHERE User='root';
Query OK, 1 row affected, 1 warning (0.01 sec)
Rows matched: 1 Changed: 1 Warnings: 1
十五、mac 中登陆mysql忘记密码解决办法的更多相关文章
- mac 中登陆mysql忘记密码解决办法
1.打开终端,输入命令:cd /usr/local/mysql/bin 2.mysql -uroot -p,用这条命令登陆时报错信息: 报错:Enter password: ERROR 1045 (2 ...
- mac中登陆mysql忘记密码解决办法
1.打开终端,输入命令:cd /usr/local/mysql/bin 2.mysql -uroot -p,用这条命令登陆时报错信息: 报错:Enter password: ERROR 1045 (2 ...
- MySQL忘记密码解决办法
一.windows下mysql忘记root密码的解决方法 详细出处参考:http://www.jb51.net/article/21984.htm 1,停止MYSQL服务,CMD打开DOS窗口,输入 ...
- mac mysql忘记密码解决办法
http://www.jb51.net/article/87580.htm http://blog.csdn.net/soft2buy/article/details/50223373
- MySQL 忘记密码解决办法
第一步: 关闭MySQL服务. 第二步: 打开DOS窗口,在里面输入安装MqSQL的目录本机为:C:\Program Files\MySQL\MySQL Server 5.6\bin 第三步: 在命 ...
- mysql忘记密码解决的办法
[很管用]忘记mysql root密码解决办法 1.编辑MySQL配置文件: 首先停止mysql服务, 然后开始编辑mysql配置文件:vi /etc/my.cnf在[mysqld]配置段添加如下一行 ...
- CentOS忘记mariadb/mysql root密码解决办法
本文不再更新,可能存在内容过时的情况,实时更新请访问原地址:CentOS忘记mariadb/mysql root密码解决办法: 这里有两种方式实现修改mariadb root密码. mariadb版本 ...
- MAC下的mysql忘记密码该怎么办??
不要着急,不要慌,好多人会忙手忙脚,以为自己安装了一个假软件,其实是你打开的方式不对而已! step1: 苹果->系统偏好设置->最下边点mysql 在弹出页面中 关闭mysql服务(点击 ...
- MySQL忘记密码解决
1.设置管理员root密码为123 开启MySQL服务后 PS C:\WINDOWS\system32> mysqladmin -uroot -p password "123" ...
随机推荐
- python模块详解 YAML和configparser
YAML模块 主要用来做配置文件用的. yaml格式: 详细参考官方文档:PyYAML configparser模块 同样是用于生成和修改配置文件用的.格式和mysql一样. 生成配置文件 impor ...
- Struts2_动态结果集
页面请求: <li><a href="user/user?type=1">返回success</a></li> <li> ...
- Oracle 数据库自动备份方案
1.新建 backup.bat脚本 @echo off echo ================================================ echo Windows环境下Ora ...
- selenium鼠标拖动
var builder = new Actions(_driver); builder.MoveToElement(_driver.GetElementByCssSelector("#com ...
- Osclass-3.6.1 (Openlogic CentOS 7.2)
平台: CentOS 类型: 虚拟机镜像 软件包: osclass3.6.1 cms commercial content management ecommerce open-source 服务优惠价 ...
- C#WinFrom写的拼图游戏
1.窗口载入时自动生成拼图按钮 ;//按钮的行.列数 Button[,] buttons = new Button[N, N];//按钮的数组 ;//记录步数 private void Form3_L ...
- 双网卡(一外一内)都启用,将内网卡默认网关去除即可正常连接Internet
- 同步软件UltraCompare 64位 软件及注册机
软件及注册机下载: https://share.weiyun.com/f09e6243887e374ead1b3a3ab8f611a9 软件官方下载地址: https://www.ultraedit ...
- py常见模块
1.系统相关的信息模块: import sys sys.argv 是一个 list,包含所有的命令行参数. sys.stdout sys.stdin sys.stderr 分别表示标准输入输出,错误输 ...
- UTF8与ANSI互转
在取回的结果中,如果有Unicode字符,用printf来打印的话,则会出现乱码.通过这个方法,可以判断是否为unicode字符,是的话,通过wprintf来打印.1.判断字符串是否为Unicode的 ...