修改mysql密码

来源:互联网 发布:调音师知乎 编辑:程序博客网 时间:2024/06/06 11:38

首先找到mysql.exe的路径,然后配置高级系统配置环境变量
在path路径下添加;D:\webx5\mysql\bin这是我的mysql.exe的路径

path:C:\Program Files (x86)\Java\jdk1.7.0_04\bin;D:\webx5\mysql\bin




window+r命令进入dos命令


C:\Users\ASUS>mysql
ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO)

C:\Users\ASUS>mysql -uroot -p
Enter password: **
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.6.26 MySQL Community Server (GPL)

Copyright (c) 2000, 2015, 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> update mysql.user set password=password('123123') where user='root';
Query OK, 1 row affected (0.06 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql>
原创粉丝点击