The following article describes how to correctly install MySQL through the rpm package and configure and uninstall MySQL. The following describes how to configure and uninstall MySQL (the best combination with PHP) detailed operation process, hope to bring you some help in this regard. Take MySQL (the best combination with PHP)-server-4.0.14-0.i386.rpm as an example, put
The following article describes how to correctly install MySQL through the rpm package and configure and uninstall MySQL. The following describes how to configure and uninstall MySQL (the best combination with PHP) detailed operation process, hope to bring you some help in this regard. Take MySQL (the best combination with PHP)-server-4.0.14-0.i386.rpm as an example, put
The following article describes how to correctly install MySQL through the rpm package and configure and uninstall MySQL. The following describes how to configure and uninstall MySQL (the best combination with PHP) detailed operation process, hope to bring you some help in this regard.
Take MySQL (the best combination with PHP)-server-4.0.14-0.i386.rpm as an example,
Put it in the/data Directory
- Cd/data
- Rpm-ivh MySQL (best combination with PHP)-server-4.0.14-0.i386.rpm
After the installation is complete, there will be a MySQL (the best combination with PHP) in the/usr/share/MySQL (the best combination with PHP) directory) mySQL (the best combination with PHP ). server and sample configuration files (such as my-huge.cnf, my-large.cnf, my-medium.cnf)
Copy an example configuration MySQL file as the configuration file for MySQL (the best combination with PHP:
- Cp/usr/share/MySQL (best combination with PHP)/my-medium.cnf/etc/my. cnf
After the rpm package is installed, MySQL (the best combination with PHP) is automatically installed as a system service. Therefore, you can use the following command to start and stop MySQL (the best combination with PHP)
Start MySQL (the best combination with PHP)
/Etc/init. d/MySQL (the best combination with PHP) start or service MySQL (the best combination with PHP) start
Stop MySQL (the best combination with PHP)
/Etc/init. d/MySQL (the best combination with PHP) stop or service MySQL (the best combination with PHP) stop
By now, MySQL (the best combination of PHP and MySQL) is installed and configured.
Install the MySQL (best combination with PHP) Client
- Rpm-ivh MySQL (best combination with PHP)-client-4.0.14-0.i386.rpm
After installing MySQL (the best combination with PHP), the directory structure is as follows:
The tool program is in the/usr/bin directory --- ls/usr/bin/MySQL (the best combination with PHP )*
Server program/usr/sbin/MySQL (best combination with PHP) d
Data directory/var/lib/MySQL (best combination with PHP)
By default, MySQL (the best combination with PHP) writes error log files, binary log files, and process files in/var/lib/MySQL (the best combination with PHP) directory, such as localhost. err, localhost. pid, localhost-bin.001, etc.
To change these conditions, modify the/etc/my. cnf file.
For example, to write a log file in the/var/log directory, you can add the following two lines to the my. cnf file:
[MySQL (best combination with PHP) d_safe]
Err-log =/var/log/MySQL (the best combination with PHP) d. log
There is a utility/usr/bin/MySQL (the best combination with PHP) _ install_db, which can be used to initialize the MySQL (the best combination with PHP) database, create the/var/log/MySQL directory (the best combination with PHP) and create the MySQL database (the best combination with PHP) (the best combination of MySQL and PHP) authorization Table and other information) and test database (empty database), If you accidentally delete the/var/log/MySQL (the best combination with PHP) directory, you can use this program to initialize.
Uninstall MySQL (the best combination with PHP)
- Rpm-qa | grep-I MySQL (the best combination with PHP)
- Rpm-ev MySQL (best combination with PHP)-server-4.0.14-0 MySQL (best combination with PHP)-client-4.0.14-0
After uninstallation, data in/var/lib/MySQL (the best combination with PHP) and/etc/my. cnf will not be deleted. If it is determined that it is useless, it will be manually deleted.
- Rm-f/etc/my. cnf
- Rm-rf/var/lib/MySQL (best combination with PHP)
The above content introduces how to configure and uninstall MySQL.