Deploy a mysql database in Linux

Source: Internet
Author: User

I have just been in touch with Linux for less than a week. I just sorted out several videos from the Internet and watched and learned. If you have time to do something by yourself today, you can use a connection provider ------- to deploy the mysql database. Hey.
I searched some information on the Internet and found two mysql rmp packages. In fact, this is equivalent to the exe Installation File in windows.
Let's talk about the installation procedure.
Download these two packages
MySQL-server-5.1.7-0.i386.rpm
MySQL-client-community-5.0.45-0.rhe13.i386.rpm

1. Install the mysql server
Rpm-ivh MySQL-server-5.1.7-0.i386.rpm
--------------------------------------------------------------
2. Install the mysql client
Rpm-ivh MySQL-client-community-5.0.45-0.rhe13.i386.rpm
--------------------------------------------------------------
3. Run mysql_install_db to initialize the database.
#/Usr/bin/mysql_install_db
--------------------------------------------------------------
4. Check whether the test is successful.
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.

... # 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.
--------------------------------------------------------------
5. log on to the database
Mysql [-u username] [-h host] [-p [password] [dbname]

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.