| 您的当前位置:首页 --> MYSQL教程 --> Mysql5.6忘记root密码修改root密码的方法 |
| MYSQL教程 Mysql5.6忘记root密码修改root密码的方法 |
| 浏览次数:1052 关键词 ( ) |
| 查看使用该CPU的产品 查看CPU天梯 |
| CPU型号:Mysql5.6忘记root密码修改root密码的方法 |
| 主频:Ghz |
| 睿频:Ghz |
| 核心数:个 |
| 不支持超核心 |
| 制作工艺: |
| 插槽类型: |
| 功耗:0W |
| L3缓存:0MB |
| 支持最大内存: 0GB |
| CPU详细参数 |
|
mysql5.6忘记数据库的root密码: [root@oraserver139 ~]# mysql -uroot -p 查看当前安装的mysql版本: root@oraserver139 ~]# rpm -qa | grep MySQL 停止mysql服务: [root@oraserver139 ~]# service mysql stop 进入到skip-grant-tables模式: [root@oraserver139 ~]# mysqld_safe --skip-grant-tables 现在就不需要密码就可以进入mysql了: [root@oraserver139 ~]# mysql Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. 进入mysql系统数据库: mysql> use mysql 修改root账户密码: mysql> update user set password=password("12345") where user="root"; 刷新权限: mysql> flush privileges; 停止mysql进程: [1]+ Stopped mysqld_safe --skip-grant-tables 启动mysql: [root@oraserver139 ~]# service mysql start 使用刚才修改的密码进入mysql: [root@oraserver139 ~]# mysql -uroot -p12345 Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show databases; mysql> SET PASSWORD = PASSWORD('12345'); mysql> show databases; 修改完成; 以上所述是小编给大家介绍的Mysql5.6忘记root密码修改root密码的方法,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对80vps网站的支持! |
| 下一个产品 SQL计算timestamp的差值的方法 上一个产品 全面了解MySql中的事务 |