windows mysql 忘记密码(解决MySQL忘记密码问题的方法)
类别:数据库 浏览量:260
时间:2021-10-07 00:09:23 windows mysql 忘记密码
解决MySQL忘记密码问题的方法为大家提供的MySQL忘记密码的解决方案,供大家参考,具体内容如下
1.在操作系统windows操作系统,xp或win7.中进入如下目录:
2.停止MySQL服务
|
C:\Program Files\MySQL\MySQL Server 5.5\bin>net stop mysql //MySQL 服务正在停止. //MySQL 服务已成功停止。 |
3.跳过授权给表
你会看到窗口光标在下一行的第一个位置闪烁,这说明已经启动了,不需要管。
4. 新建一个命令行窗口同样进入到e:\mysql5.5\bin目录,启动mysql
|
C:\Program Files\MySQL\MySQL Server 5.5\bin>mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.5.36 MySQL Community Server (GPL) Copyright (c) 2000, 2014, 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> show databases; + --------------------+ | Database | + --------------------+ | information_schema | | mysql | | performance_schema | | test | + --------------------+ 4 rows in set (0.00 sec) |
5.选择mysql数据库
|
mysql> use mysql; Database changed mysql> update user set password = PASSWORD ( 'root' ) where user = 'root' ; Query OK, 2 rows affected (0.00 sec) Rows matched: 2 Changed: 2 Warnings: 0 mysql> flush privileges ; Query OK, 0 rows affected (0.01 sec) |
6.退出mysql终端:
|
mysql> quit Bye |
7.看看那任务管理器中是否有mysqld.exe进程,如有,kill .
8.启动mysql服务器
|
C:\Program Files\MySQL\MySQL Server 5.5\bin>net start mysql //MySQL 服务正在启动 . //MySQL 服务已经启动成功。 |
9.登录mysql服务器
|
C:\Program Files\MySQL\MySQL Server 5.5\bin>mysql -u root -p root Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.5.36 MySQL Community Server (GPL) Copyright (c) 2000, 2014, 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> |
以后再也不用担心MySQL忘记密码了。
以上就是本文的全部内容,希望对大家的学习有所帮助。
您可能感兴趣
- 怎么查看mysql运行日志(通过Query Profiler查看MySQL语句运行时间的操作方法)
- docker搭建mysql服务(Docker部署Mysql集群的实现)
- mysql允许远程访问docker(Docker部署mysql远程连接 解决2003的问题)
- mysql数据类型和使用方法(MySQL数据类型全解析)
- mysql查询慢有哪些原因(MySQL 查询速度慢的原因)
- SQL SERVER与MySQL数据类型的对应关系
- mysql怎么给查询权限(MySql设置指定用户数据库查看查询权限)
- mysql读写分离怎么做(MySQL读写分离,写完读不到问题如何解决)
- mysql怎么设置某个字段默认值(MySQL表字段时间设置默认值)
- 合理设置服务mysql最大连接数(MySQL正确修改最大连接数的3种方案)
- mysql云数据库数据恢复(MySQL 利用frm文件和ibd文件恢复表数据)
- php7用什么替代mysql(mysqli扩展无法在PHP7下升级问题的解决)
- mysql是自动commit吗(详解MySQL与Spring的自动提交autocommit)
- mysql存储过程声明(MySQL存储过程的深入讲解in、out、inout)
- hive分析后如何录入mysql(hive从mysql导入数据量变多的解决方案)
- mysql客户端怎么运行程序(MySQL 如何连接对应的客户端进程)
- 爱情可以当饭吃吗(怎么回复)
- 高考数学题(高考数学题基础题占多少分)
- 没钱只能吃土(没钱要吃土了幽默短信发朋友圈)
- 今年考高会很难吗(今年高考会考试吗)
- 盘古开天地 他创造了世界,谁创造了盘古 盘古是伏羲吗(盘古开天地他创造了世界)
- 关于队徽 你了解这些么 二(关于队徽你了解这些么)
热门推荐
- vue是怎样进行页面跳转(Vue实现登陆跳转)
- php时间戳是什么意思(php时间戳转换代码详解)
- html5定位教学(Html5 webview元素定位工具的实现)
- JS实现文字向下滚动
- thinkphp从模板自定义标签(Thinkphp5.0框架视图view的循环标签用法示例)
- 查看IIS当前连接数
- docker启动springboot项目(Docker运行springboot项目的实现)
- BT宝塔Linux服务器管理助手架设VPS面板(安装及初始设置应用)(BT宝塔Linux服务器管理助手架设VPS面板安装及初始设置应用)
- css3语法结构(CSS3中的注音对齐属性ruby-align用法指南)
- canvas怎么获取内容(详解canvas.toDataURL报错的解决方案全都在这了)
排行榜
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9