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
The basic principle of all animations is to displ...
CSS issues about background gradient and automati...
Carousel animation can improve the appearance and...
Table of contents Logical Layering Separate busin...
Table of contents 1. Commonjs exports and require...
This article shares with you the MySQL 8.0.17 ins...
Original address: http://www.webdesignfromscratch...
There are very complex HTML structures in web pag...
Utilize the browser's non- overflow:auto elem...
Perfect solution to VMware black screen after Mac...
Today, let’s discuss an interesting topic: How mu...
Table of contents 1. Function Binding 2. With par...
For front-end developers, ensuring that the code ...
1. First, download the latest version of MySQL fr...
Table of contents Mainly used Postman functions D...