1. Modify MySQL login settings: # vim /etc/my.cnf Add a sentence: skip-grant-tables like: [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock 2. Restart mysql # service mysqld restart Stopping MySQL: [ OK ] Starting MySQL: [ OK ] 3. Change Password mysql> USE mysql; Database changed mysql> UPDATE user SET Password = password ('new password') WHERE User = 'root'; Query OK, 0 rows affected (0.00 sec) Rows matched: 2 Changed: 0 Warnings: 0 mysql> flush privileges; Query OK, 0 rows affected (0.01 sec) mysql> quit 4. Modify the configuration file you just modified # vim /etc/my.cnf 5. Restart mysql # service mysqld restart Stopping MySQL: [ OK ] Starting MySQL: [ OK ] The above is the method of changing the MySQL password under CentOS introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: What are the new features of Apache Spark 2.4, which will be released in 2018?
>>: Javascript to achieve the effect of closing advertisements
CSS3 can create animations, which can replace man...
As shown below: CSS CodeCopy content to clipboard...
This article shares the specific code of jQuery t...
Table of contents Linux 1. Basic use of crontab 2...
Use anti-shake to make DIV disappear when the mou...
As the title says: The height is known, the width...
HTML comment box with emoticons. The emoticons ar...
Three ways to introduce CSS 1. Inline styles Adva...
When the data changes, the DOM view is not update...
We know that the properties of the select tag in e...
Preface Because of project needs, the storage fie...
Project Background Recently, there is a project w...
If you are a developer looking to get into the wo...
Concept introduction : 1. px (pixel): It is a vir...
Table of contents Linux netstat command 1. Detail...