MySQL For Linux Installation Log

Source: Internet
Author: User

I. Introduction

I have been using Linux for a long time. I have never studied hard tasks and system learning. Recently, I have to use MySQL in Linux for my work. I thought that I had experience using SQL Server in Windows and thought it would be easy to install MySql in Linux. I had a lot of detours and encountered many problems when installing and using MySQL, after all, there is a big difference between Linux and Windows. I wrote this article to help beginners like me learn less and get started as soon as possible. The Linux environment in this article is Red Hat 9.0 and MySQL is 4.0.16.

Ii. Install MySQL

1. Download the MySQL Installation File

The following two files are required to install MySQL:

MySQL-server-4.0.16-0.i386.rpm

MySQL-client-4.0.16-0.i386.rpm

Open this webpage at http://www.mysql.com/downloads/mysql-4.0.html, pull down the webpage to the latest Linux x86 RPM downloads option, 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:

[Root @ test1 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%]

...... (Omitted)

/Usr/bin/mysqladmin-u root password \ 'new-password \'

/Usr/bin/mysqladmin-u root-h test1 password \ 'new-password \'

...... (Omitted)

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.

[Root @ test1 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 that the MySQL service has been started.

2) install the client

Run the following command:

[Root @ test1 local] # rpm-ivh MySQL-client-4.0.16-0.i386.rpm

Warning: MySQL-client-4.0.16-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5

Preparing... ######################################## ### [100%]

1: mySQL-client ##################################### ###### [100%]

The installation is complete.

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

  • 1
  • 2
  • 3
  • 4
  • 5
  • Next Page

Related Article

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.