How to uninstall MySQL database with rpm

Source: Internet
Author: User
The following article describes how to install, configure, and uninstall the MySQL database through the rpm package. We use MySQL (the best combination with PHP) -server-4.0.14-0.i386.rpm for the actual case to explain in detail, the following is the main content of the body. Put cddatarpm-ivhMySQL in the data DIRECTORY (with PHP

The following article describes how to install, configure, and uninstall the MySQL database through the rpm package. We use MySQL (the best combination with PHP) -server-4.0.14-0.i386.rpm for the actual case to explain in detail, the following is the main content of the body. Put cd/data rpm-ivh MySQL in the/data Directory (with PHP


The following article describes how to install, configure, and uninstall the MySQL database through the rpm package. We use MySQL (the best combination with PHP) -server-4.0.14-0.i386.rpm for the actual case to explain in detail, the following is the main content of the body.

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 file as the configuration file for MySQL (the best combination of PHP and MySQL:

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, the MySQL (the best combination with PHP) service 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)

Original article address: uninstall the MySQL database and use rpm for implementation. Thank you for sharing it with the original author.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.