Detailed process of installing, configuring, and detaching mysql using rpm packages .. Detailed procedures for installing, configuring, and uninstalling mysql using rpm packages. detailed process of installing, configuring, and detaching mysql through rpm packages. take the MySQL-server-4.0.14-0.i386.rpm as an example, put in the data Directory using rpm Package installation, configuration and uninstall mysql tutorial detailed process.
Detailed process of installing, configuring, and detaching mysql through rpm packages.
Take MySQL-server-4.0.14-0.i386.rpm as an example, put it under the/data Directory
Cd/data
Rpm-ivh MySQL-server-4.0.14-0.i386.rpm
After installation is complete, there will be a mysql startup script in the/usr/share/mysql directory mysql. server and sample configuration files (such as my-huge.cnf, my-large.cnf, my-medium.cnf)
Copy an example configuration file as the mysql configuration file:
Cp/usr/share/mysql/my-medium.cnf/etc/my. cnf
After the rpm Package is installed, mysql is automatically installed as a system service. Therefore, you can run the following command to start or stop mysql:
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 has been 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 the error log file, binary log file and process file in the/var/lib/mysql 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:
[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 tutorial, that is, to create the/var/log/mysql directory, and create mysql database (mysql authorization table and other information) and test Database (empty database). if you accidentally delete the/var/log/mysql directory, you can use this program to initialize it.
Uninstall mysql
Rpm-qa | grep-I mysql
Rpm-ev MySQL-server-4.0.14-0 MySQL-client-4.0.14-0
Data in/var/lib/mysql and/etc/my. cnf will not be deleted after uninstallation. if it is determined that it is useless, it will be deleted manually.
Rm-f/etc/my. cnf
Rm-rf/var/lib/mysql
Detailed procedures of installing, configuring, and detaching mysql through rpm packages. take MySQL-server-4.0.14-0.i386.rpm as an example, put it under the/data Directory...