1. First confirm that the server is in a secure state, that is, no one can arbitrarily connect to the MySQL database. Because the MySQL database is completely out of password protection during the reset of MySQL's root password, other users can log in and modify MySQL information arbitrarily. You can enclose the ports outside of MySQL and stop the Apache and all user processes to achieve the server's quasi-safe state. The safest state is to operate on the server's Console and unplug the network cable. 2. Modify the MySQL login settings: # vi /etc/my.cnf Add a sentence to the [mysqld] section: skip-grant-tables For example: [mysqld] datadir=/var/lib/mysql socket=/var/lib/Mysql/mysql.sock skip-grant-tables Save and exit vi. 3. Restart mysqld # /etc/init.d/mysqld restart Stopping MySQL: [ OK ] Starting MySQL: [ OK ] 4. Log in and modify the MySQL root password # /usr/bin/mysql Welcome to the MySQL monitor. Commands end with ; or \\g. Your MySQL connection id is 3 to server version: 3.23.56 Type ‘help;’ or &lsquo ;\\h’ for help. Type ‘\\c’ to clear the buffer. mysql> USE mysql ; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A 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 Bye 5. Modify the MySQL login settings back # vi /etc/my.cnf Delete the skip-grant-tables just added in the [mysqld] section and exit vi. 6. Restart mysqld # /etc/init.d/mysqld restart Stopping MySQL: [ OK ] Starting MySQL: [ OK ]
Redis is an open source, log-based, Key-Value database that is written in ANSI C, supports networki
The method is as follows: 1. Create a new .htaccess file in the directory where you need to use the
Azure is one of the representatives of more and more companies considering moving their business to
Layer 2 Tunneling Protocol (L2TP) is an industry standard Internet tunneling protocol that uses UDP
Ubuntu system encrypts files for transmission method
How to limit the execution permission of the /tmp partition
Linux uses openssl to generate SSL certificate for nginx to use the basic tutorial
Tizen 1.0 released Linux-based mobile operating system
Linux 12 is not known 12 insider
LVS ipvsadm Command Reference Guide
Redhat5 installation network card error, can not be installed properly
The colrm command usage in Linux
Research and transplantation of MiniGUI in embedded Linux environment
Lenovo Zhaoyang E49 computer has been installed after WinXP has been a splash screen solution
Win10 can not find the local application how to do
How to always display the menu bar
Slimming cleanup work after installing Windows 7
Install Win8 dual system graphic tutorial with U disk
Prohibit PHP execution permission for a directory under Apache
Windows7 Tips: Implement Boot Auto Networking
How to use the "device" super button that slides out on the right side of the Win8 system