System: Linux as3
MySQL version: mysql-standard-4.0.24-pc-linux-gnu-i686.tar.gz
Installation Method: Install tarball
MySQL installation path:/usr/local/MySQL
Installation Process
1. log on to the system as root
2. Copy the downloaded installation package to the appropriate location (/usr/lcoal
3. decompress the package
CD/usr/local # enter the working directory
Tar zxf mysql-standard-4.0.24-pc-linux-gnu-i686.tar.gz
4. Create a directory connection
Ln-s mysql-standard-4.0.24-pc-linux-gnu-i686 MySQL
5. Create mysql users and groups
Groupadd MySQL
Useradd-G MySQL
6. Change the access permission of the MySQL directory.
Chown-r mysql. # ensure that the current directory is/usr/lcoal/MySQL.
Chgrp-r MySQL.
7. Run the configuration script as a MySQL user
Su-M MySQL # Switch to MySQL user
CD/usr/local/MySQL # note that after switching the user, the working directory is no longer/usr/local/MySQL. So you have to repeat it.
./Configure # execute the configuration script
8. At this point, the installation has been completed. In some documents, you still need to execute scripts/mysql_install_db. In fact, this statement is not required because the configure script has already executed this statement. If you execute more statements, an error may occur.
9. Check whether the installation is successful.
/Usr/local/MySQL/bin/MySQL
If a MySQL prompt is displayed, it indicates that the prompt is successful!
10. automatically enable the MySQL service when the system starts.
Su root # switch back to root user
CD/usr/local/MySQL
CP support-files/MySQL. Server/etc/init. d/MySQL # copy the msql script file to the startup directory of the system.
CD/etc/init. d/
Chkconfig -- add MySQL # Add MySQL to the startup service list
Chkconfig MySQL on # enable MySQL service automatically when the system starts
After the system is restarted, run/usr/local/MySQL/bin/MySQL. If a MySQL prompt is displayed, the entire installation is successful.