MySQL57修改root密碼
之前在電腦里安裝了MySQL57之后,一直沒用,卻忘記了root密碼,
在網上找了一些資料修改root密碼,卻一直出錯。直到試到這個:
用管理員權限打開CMD
CD C:\Program Files\MySQL\MySQL Server 5.7\bin
net stop mysql57
mysqld --skip-grant-tables
再另外打開一個管理員權限的CMD
CD C:\Program Files\MySQL\MySQL Server 5.7\bin
mysql
mysql> use mysql
mysql> update mysql.user set authentication_string=PASSWORD('yourpassword') where user='root';
mysql> flush privileges;
mysql> quit
Bye
OK,用新密碼登陸即可:
C:\Program Files\MySQL\MySQL Server 5.7\bin>mysql -u root -p
Enter password: ************
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 5.7.15 MySQL Community Server (GPL)
Copyright (c) 2000, 2016, 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>
最新文章
- Unity3D 物体跟随鼠标旋转
- String 和 byte[]
- focuskye 学习及下载
- memcached完全剖析--1
- juery mobile select下来菜单选项提交form问题
- 文件磁盘读写类CArchive类
- python socket学习
- Java第四周学习日记(绪)
- HDU1695-GCD(数论-欧拉函数-容斥)
- MySQL1236错误的恢复
- 小兴趣:修改Hosts文件,禁止访问指定网页
- js 用touch事件实现简单tap
- Excel坐标自动在AutoCad绘图_5
- 外部javascript
- Js 分别取一个数的百位,十位,个位
- 服务发现:Zookeeper vs etcd vs Consul 参考自http://dockone.io/article/667
- 1.mybatis入门
- buffers与cached
- Mac OS 基于 VirtualEnv 的安装 tensorflow 1.3.0
- linux下c的网络编程---转载
热门文章
- linux下mycat读写分离的配置
- python 基础之第十二天(re正则,socket模块)
- Matrix Recurrence
- 搭建Linux的VMware Workstation Pro
- C++11: Multi-core Programming – PPL Parallel Aggregation Explained
- 5 pyspark学习---Broadcast&;Accumulator&;sparkConf
- fitnesse(gradle构建)安装步骤
- Appium + junit 的简单实例
- HDU4247【瞎搞】
- word2vec改进之Negative Sampling