In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to install, configure and uninstall mysql through the rpm package", the content of the article is simple and clear, easy to learn and understand, now please follow the editor's ideas slowly in depth, together to study and learn "how to install, configure and uninstall mysql through the rpm package"!
Take MySQL-server-4.0.14-0.i386.rpm as an example, put it in the / data directory
Cd / data
Rpm-ivh MySQL-server-4.0.14-0.i386.rpm
After installation, there will be a mysql startup script mysql.server and sample configuration files (such as my-huge.cnf, my-large.cnf, my-medium.cnf) in the / usr/share/mysql directory.
Copy a sample configuration file as the configuration file for mysql:
Cp / usr/share/mysql/my-medium.cnf / etc/my.cnf
After the rpm package is installed, mysql is automatically installed as a system service, so you can start and stop mysql using the following command
Start mysql
/ etc/init.d/mysql start or service mysql start
Stop mysql
/ etc/init.d/mysql stop or service mysql stop
At this point, the mysql service is installed and configured.
Install the mysql client
Rpm-ivh MySQL-client-4.0.14-0.i386.rpm
After mysql is installed, the directory structure is as follows:
The tool program is in the / usr/bin directory-ls / usr/bin/mysql*
Server program / usr/sbin/mysqld
Data directory / var/lib/mysql
By default, mysql writes error log files, binary log files, and process files in the / var/lib/mysql directory, such as localhost.err, localhost.pid, localhost-bin.001, etc.
To change these situations, modify the / etc/my.cnf file
If you write the log file in the / var/log directory, you can add the following two lines to the my.cnf file:
[mysqld_safe]
Err-log = / var/log/mysqld.log
There is a utility / usr/bin/mysql_install_db, which can be used to initialize the mysql database, that is, to create the / var/log/mysql directory, and to create the mysql database (mysql authorization table and other information) and the test database (empty library). If you accidentally delete the / var/log/mysql directory, you can initialize it.
Uninstall mysql
Rpm-qa | grep-I mysql
Rpm-ev MySQL-server-4.0.14-0 MySQL-client-4.0.14-0
The data and / etc/my.cnf in / var/lib/mysql will not be deleted after uninstallation. If determined to be useless, delete them manually.
Rm-f / etc/my.cnf
Rm-rf / var/lib/mysql
Thank you for your reading, the above is the content of "how to install, configure and uninstall mysql through the rpm package". After the study of this article, I believe you have a deeper understanding of how to install, configure and uninstall mysql through the rpm package. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.