mysql 忘记root密码 如何解决
2015-03-11 23:59
429 查看
linux redhat6 &&mysql 5.6
第一步,关闭mysql服务
[root@ashe ~]# service mysqld stop
Shutting down MySQL. [确定]
第二步,以安全模式启动MySQL:
/usr/local/mysql/bin/mysqld_safe –skip-grant-tables &
然后会出现
[1] 7047
不要管它,回车键,回到命令行
[root@ashe ~]# 150312 07:54:04 mysqld_safe Logging to ‘/usr/local/mysql/data/ashe.err’.
150312 07:54:04 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
不要管它,回车键,回到命令行
[root@ashe ~]# mysql -uroot -p
Enter password: 这里直接回车,不要输入密码,
[root@ashe ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.6.4-m7-log Source distribution
Copyright (c) 2000, 2011, 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库,更改user表。
第一步,关闭mysql服务
[root@ashe ~]# service mysqld stop
Shutting down MySQL. [确定]
第二步,以安全模式启动MySQL:
/usr/local/mysql/bin/mysqld_safe –skip-grant-tables &
然后会出现
[1] 7047
不要管它,回车键,回到命令行
[root@ashe ~]# 150312 07:54:04 mysqld_safe Logging to ‘/usr/local/mysql/data/ashe.err’.
150312 07:54:04 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
不要管它,回车键,回到命令行
[root@ashe ~]# mysql -uroot -p
Enter password: 这里直接回车,不要输入密码,
[root@ashe ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.6.4-m7-log Source distribution
Copyright (c) 2000, 2011, 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库,更改user表。
相关文章推荐
- 如何解决Mysql中忘记root密码的情况
- MySQL,如何修改root帐户密码、如何解决root帐户忘记密码的问题
- MySQL,如何修改root帐户密码、如何解决root帐户忘记密码的问题
- MySQL,如何修改root帐户密码、如何解决root帐户忘记密码的问题
- MySQL忘记root密码如何解决?
- windows下mysql忘记root密码的解决方法
- linux下 mysql 忘记root用户密码解决办法
- linux下 mysql 忘记root用户密码解决办法
- mysql误删除root用户或者忘记root密码时的解决办法
- mysql忘记root密码的通用的解决办法:
- Linuxroot忘记密码如何解决!
- mysql 忘记root密码的解决
- windows下忘记mysql超级管理员root密码的解决办法
- MySQL忘记root密码解决方法
- mysql误删除root用户或者忘记root密码时的解决办法(转)
- windows下mysql忘记root密码的解决方法
- 忘记了MySQL的root密码应当如何取回
- LINUX平台下忘记mysql的root密码解决办法
- linux下启动Mysql忘记root密码的解决办法
- MySQL忘记root密码解决办法