MySQL in Linux environment

  
 

Download the MySQL installation file

Installing MySQL requires the following two files: MySQL-server-4.0.16-0.i386.rpmMySQL-client-4.0.16-0.i386.rpm

Download address: http://www.mysql.com/downloads/mysql-4.0.html, open this page, drop down the page to find the "Linux x86 RPM downloads", find “Server” and “Client Programs & rdquo; items, download the above two rpm files.

The rpm file is a software installation package developed by Red Hat. The rpm allows Linux to eliminate many complicated procedures when installing packages. The commonly used parameter for this command is –ivh, where i indicates that the specified rmp package will be installed, V indicates the details of the installation, and h indicates that the &#quo;;#” symbol appears during installation to show the current installation process. . This symbol will continue until the installation is complete.

Installing the server side

Run the following command in a directory with two rmp files: [root@test1 local]# rpm -ivh MySQL-server-4.0.16-0.i386. The rpm displays the following information. Warning: MySQL-server-4.0.16-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5Preparing… ############################## ##################[100%]1: MySQL-server ###################################### ##################### [100%]. . . . . . (Omitted) /usr/bin/mysqladmin -u root password ‘new-password’/usr/bin/mysqladmin -u root -h test1 password ‘new-password’. . . . . . (Omitted to show) Starting mysqld daemon with databases from /var/lib/mysql

If the above information appears, the server is installed. If the test is successful, you can run netstat to see if the Mysql port is open. If it is open, the service has been started and the installation is successful. The default port for Mysql is 3306. [root@test1 local]# netstat -natActive Internet connections (servers and established)Proto Recv-Q Send-Q Local Address Foreign Address Statetcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN above shows that the MySQL service has been start up.

Installing the client

Run the following command: [root@test1 local]# rpm -ivh MySQL-client-4.0.16-0.i386.rpm displays the following message warning: MySQL-client -4.0.16-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5Preparing… ########################################### ############## [100%]1: MySQL-client ################################################## ################ [100%] shows that the installation is complete.

Copyright © Windows knowledge All Rights Reserved