How to Reset the MySQL Root Password
How to Reset the MySQL Root Password
http://dev.mysql.com/doc/refman/5.6/en/resetting-permissions.html
cat /etc/my.conf
...
[mysqld]
##add parameter##
skip-grant-tables <=without password login
skip-networking <=prevent remote clients from connecting
[root@dbdou02 tmp]# mysql -uroot -proot
mysql> FLUSH PRIVILEGES;
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('DOUdou123#');
cat /etc/my.conf
...
[mysqld]
##remove parameter##
#skip-grant-tables
#skip-networking
[root@dbdou02 ~]# 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.29 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>
##MySQL root password reset is successful!##
########################################################################################
版權所有,文章允許轉載,但必須以連結方式註明源地址,否則追究法律責任!【QQ交流群:53993419】
QQ:14040928 E-mail:dbadoudou@163.com
本文連結: http://blog.itpub.net/26442936/viewspace-2055047/
********* 6年DBA工作經驗,尋求新工作機會 *********
########################################################################################
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26442936/viewspace-2055047/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Change redhat root passwordRedhat
- Give root password for maintenanceAINaN
- After mysql installation, we need to change the password of root as belowMySql
- mysql 1045, "Access denied for user 'root'@'localhost' (using password: NO)"MySqllocalhost
- MYSQL解決error: 'Access denied for user 'root'@'localhost' (using password:MySqlErrorlocalhost
- 【MySQL】---1045-Access denied for user 'root'@'localhost'(using password :YES)MySqllocalhost
- MySQL:You must reset your password using ALTER USER statement before executing this statement.MySql
- MySQL系列:Docker安裝 MySQL提示錯誤:Access denied for user'root'@'localhost' (using password:yes)MySqlDockerlocalhost
- Access denied for user 'root'@'localhost' (using password: NO)localhost
- How to change the APPS db password in Oracle EBSAPPOracle
- #1045 - Access denied for user 'root'@'localhost' (using password: NO)localhost
- 12c-How To Recover Root ContainerAI
- 解決Mysql:ERROR 1045 (28000):Access denied for user ‘root‘@‘localhost‘ (using password: NO)的方法MySqlErrorlocalhost
- MySQL 8.0.13 密碼問題 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)MySql密碼Errorlocalhost
- mac os x 安裝mysql遇到 Access denied for user ‘root‘@‘localhost‘ (using password: YES)的解決方法MacMySqllocalhost
- 使用root 切換普通使用者提示:[sudo] password for oracle:Oracle
- ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)Errorlocalhost
- linux安裝MySQL出現ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)LinuxMySqlErrorlocalhost
- How to change the password for win2003 via remote desktopREM
- 啟動報錯:Access denied for user 'root'@'localhost' (using password:YES)localhost
- java.sql.SQLException: Access denied for user ‘root‘@‘localhost‘ (using password: YES)JavaSQLExceptionlocalhost
- Navicat遠端連線MySQL 提示1045 - Access denied for user 'root'@'223.74.158.192'(using password:YES)MySql
- [Mysql]mysql忘記ROOT密碼MySql密碼
- ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password:YES)Errorlocalhost
- CentOS 7啟動時出現報錯提示“Give root password for maintenance”CentOSAINaN
- MySQL 重置Root密碼MySql密碼
- mysql修改root密碼MySql密碼
- mysql重置root密碼MySql密碼
- 修改mysql root密碼MySql密碼
- How to configure password openldap server in Red Hat Enterprise Linux 5?LDAServerLinux
- 報錯”ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: NO)”Errorlocalhost
- ERROR 1045 (28000): Access denied for user 'root'@'127.0.0.1' (using password: YES)Error127.0.0.1
- MySQL:Your password does not satisfy the current policy requirementsMySqlUIREM
- vue專案中連線MySQL時,報錯ER_ACCESS_DENIED_ERROR: Access denied for user 'root'@'localhost' (using password:YES)VueMySqlErrorlocalhost
- 【轉】How to recover from root.sh on 11.2 Grid Infrastructure FailedASTStructAI
- MySQL 8.0 重置 root 密碼MySql密碼
- Mysql 5.5 重置root密碼MySql密碼
- 修改mysql的root密碼MySql密碼