1. Download the MySQL installation file to install MySQL requires the following two files:
mysql-server-4.0.16-0.i386.rpm
mysql-client-4.0.16-0.i386.rpm
To: http://www.mysql.com/downloads/mysql-4.0.html, open this page, drop-down page find "Linux x86 RPM Downloads" entry, find "Server" and "Client programs "Item, download the required two RPM files.
RPM file is a software installation package developed by Red Hat, which allows Linux to be exempt from many complex procedures when installing packages. The parameters commonly used for this command during installation are –IVH, where I means that the specified RMP package will be installed and V represents the details of the installation, and h means that the "#" symbol appears during installation to show the current installation process. This symbol will continue until the installation is complete before stopping.
2. Install the server side in the directory with two RMP files, run the following command:
[Email protected] local]# RPM-IVH mysql-server-4.0.16-0.i386.rpm
The following information is displayed.
Warning:mysql-server-4.0.16-0.i386.rpm:v3 DSA Signature:nokey, key ID 5072e1f5 Preparing ... #################### ####################### [100%] 1:mysql-server ########################################### [100%] ... (Omit display)/usr/bin/mysqladmin-u root password ' new-password '/usr/bin/mysqladmin-u root-h test1 password ' new-password ' 。。。。。。 (Omit display) starting mysqld daemon with databases From/var/lib/mysql
If the above information appears, the server installation is complete. Test success can run netstat see if the MySQL port is open, such as open indicates that the service has been started and the installation is successful. The default port for MySQL is 3306.
[Email protected] local]# Netstat-nat Active Internet connections (servers and established) Proto recv-q Send-q Local Address Foreign address state TCP 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
The above shows you can see that the MySQL service has been started.
3. Install the client to run the following command:
[Email protected] local]# RPM-IVH mysql-client-4.0.16-0.i386.rpm
Displays the following information
Warning:mysql-client-4.0.16-0.i386.rpm:v3 DSA Signature:nokey, key ID 5072e1f5 Preparing ... ####################### #################### [100%] 1:mysql-client ########################################### [100%]
The display is complete and installed.
Installing MySQL in a Linux environment