MySQL tutorial forget root password correct solution
Describes the MySQL forgot root password correct solution, we all know in the actual operation forgot the password
is a very troubling thing, the following is the correct solution to this
Workaround One:
To other MySQL-installed servers (if you want to know the MySQL root password on the server), open the "MySQL installation directory/var/mysql tutorial," which will be the user.frm, user. MyD, user. Myi three files are copied to the
First with the root account login phpMyAdmin, and then click on the left to enter the MySQL database, at the top of the click "MySQL" into the SQL input interface. Enter the following command:
The code is as follows
Copy Code
The first of these methods
[root@localhost ~]#/usr/local/mysql/bin/mysqladmin-u root password ' new_password '
This method is set for general installation.
The second method
Mysql>update user SET Password=password (' New_password ') WHERE user= '
If you cannot log on to the system because you forgot the root password, try the following method to change the root password you forgot:
Method One:
1, reboot the system. When the system boots to the grub or lilo (now typically Grub) boot menu,
1 , principleBy configuring the parameter "Skip_grant_tables" to skip the grant_tables (authorization table) at MySQL startup, the root account password can be recharged by command2 , WayFirst you need to stop the MySQL service(1 ) in My.ini file of
Method 1: Use the Set password commandMysql-u Root mysql> SET PASSWORD for ' root ' @ ' localhost ' = PASSWORD (' Newpass ');Method 2: Use Mysqladminmysqladmin-u root Password "Newpass"If Root has already set a password, use the following
Listen to the Voice
Browse:16925
|
Updated: 2015-06-12 14:49
|
Tags:windows
1
2
3
4
5
6
Step through ReadingMySQL is a relational database management system, and MySQL is one of the
MySQL multiple ways to change the root passwordUnder Navicat for MySQL directly execute SET PASSWORD for ' root ' @ ' localhost ' = PASSWORD (' Newpass '); 'll beAssuming that the compilation installation path is under/USR/LOCAL/MSYQLTo set the
Do not know in the CMD mode is not case-sensitive, I capitalized successfully, lowercase did not succeed, I do not know the spelling of the error, or case-sensitive!!??Method 1: Use the Set password commandMysql-u Rootmysql> SET PASSWORD for ' root '
ObjectiveMySQL5.7 in order to enhance security, yum installed a random password for root user, while modifying the root password, also added some verification, will be reported Your password does not satisfy the current policy Requirements
When using MySQL, if you forget the other user's password, you can use the root user to reset, but if you forget the root password, you need to use a special method to operate.Directly modify the authorization table can modify the root password, the
Often have friends or colleagues ask, MySQL root password forgot, do not know how to do.In fact, the solution is very simple, the following is a detailed procedure.(1) Modify the configuration file my.cnf, add it under Configuration file
Method 1: Use the Set password commandMysql-u Rootmysql> SET PASSWORD for ' root ' @ ' localhost ' = PASSWORD (' Newpass ');Method 2: Use Mysqladminmysqladmin-u root Password "Newpass"If Root has already set a password, use the following
My test machine for a long time did not use MySQL, the password forgotten, now need to login, and then change the password, the steps are as follows:1. Stop the database/etc/init.d/mysqld stop2. Modify MY.CNFModify the My.cnf file to add
Method 1: Use the Set password commandMysql-u Rootmysql> SET PASSWORD for ' root ' @ ' localhost ' = PASSWORD (' Newpass ');Method 2: Use Mysqladminmysqladmin-u root Password "Newpass"If Root has already set a password, use the following
One, under the widows1, first check whether the MySQL service is started, if it has been started to stop the service, can be run in the Start menu, using the command:Start-to-menu->cmd->net stop MySQLOpen the first CMD1 window and switch to the
MySQL has three ways of changing the root password:1.mysqladmin-uroot-p Password "12"This will change the root password to 12, and note that the new password is enclosed in double quotes.2.root log in to MySQL server and update the user table in
Method 1: Use the Set password commandMysql-u Rootmysql> SET PASSWORD for ' root ' @ ' localhost ' = PASSWORD (' Newpass ');Method 2: Use Mysqladminmysqladmin-u root Password "Newpass"If Root has already set a password, use the following
1. First verify that the server is in a secure state, that is, no one can connect to the MySQL database arbitrarily. Because theMySQL database is completely password-protected during the reset of the root password of MySQLStatus, other users can
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.