Operation notes: Install mysql in Linux

Source: Internet
Author: User

The IT industry is now very popular. With the development of society, technology is becoming more and more advanced, and the knowledge is gradually enriched. So many people begin to learn about Linux. However, we also encountered many problems during our study. Today we will focus on installing Linux mysql. I hope you will learn how to install mysql in Linux through this article.

1. Download the MySQL Installation File
The following two files are required to install MySQL:
MySQL server-5.1.7-0.i386.rpm

Is: http://dev.mysql. com/downloads/mysql/5.1.html. Open this page and find "Linux x86 generic RPM (statically linked against glibc 2.2.5) downloads" in the drop-down list, find the "Server" and "Client programs" items and download the above two rpm files.

2. Install MySQL
The rpm file is a software installation package developed by Red Hat. rpm frees Linux from complicated procedures when installing software packages. The frequently used parameter of this command during installation is-ivh, where I indicates that the specified rmp package will be installed, and V indicates the detailed information during installation, h indicates that the "#" symbol appears during the installation to display the current installation process. This symbol will not stop until the installation is complete.

1) install the server
Run the following command in the directory with two rmp files:

 
 
  1. [Root @ test1 local] # rpm-ivh MySQL-server-5.1.7-0.i386.rpm for MySQL-client-5.1.7-0.i386.rpm
  2. The following information is displayed.
  3. Warning: MySQL-server-5.1.7-0.i386.rpm.
  4. Signature: NOKEY, key ID 5072e1f5
  5. Preparing... ######################################## ### [100%]
  6. 1: mySQL-server ##################################### ###### [100%]
  7. /Usr/bin/mysqladmin-u root password 'new-password'
  8. /Usr/bin/mysqladmin-u root-h test1 password 'new-password'
  9. Starting mysqld daemon with databases from/var/lib/mysql

If the preceding information is displayed, the Server installation is complete. Run netstat to check whether the Mysql port is opened. If yes, the service is started and the installation is successful. The default Mysql port is 3306.

 
 
  1. [root@test1 local]# netstat -nat   
  2. Active Internet connections (servers and established)   
  3. Proto Recv-Q Send-Q Local Address Foreign AddressState   
  4. tcp00 0.0.0.0:33060.0.0.0:* LISTEN  


The above shows that the MySQL service has been started.

2) install the client
Run the following command:

 
 
  1. [root@test1 local]# rpm -ivh MySQL -client-5.1.7-0.i386.rpm   
  2. warning: MySQL -client-5.1.7-0.i386.rpm : V3 DSA signature: NOKEY, key ID 5072e1f5   
  3. Preparing...########################################### [100%]   
  4. 1:MySQL -client  ########################################### [100%]  

The installation is complete.
Use the following command to connect to mysql and test whether the connection is successful.

In this way, you can complete the installation of Linux mysql.

  1. Analysis on Suse Linux under vm
  2. Preschool guidance: SUSE Linux
  3. Abbreviations in SUSE Linux
  4. Operation Manual: Install the RDAC driver in SUSE
  5. Your Chameleon: Open Suse

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.