centos6.5 installing MySQL

Source: Internet
Author: User

1. Check if MySQL is installed

Check to see if MySQL is installed before installing it.

If so, execute # rpm-e MySQL or # rpm-e--nodeps mysql Delete.

2. Installation via YML

Enter # Yum list First | grep mysql command to view the downloadable version of the MySQL database available on Yum.

Then # yum install-y mysql-server mysql mysql-devel for installation.

When this interface appears, it means that it's installed.

This time you can enter # Rpm-qi mysql-server to see the MySQL information.

3. Modify MySQL Configuration and startup

Start the MySQL service by executing # service mysqld start.

Execute # Service MYSQLD status to see the state of MySQL.

In general, we all want MySQL to boot, so we'll go through # chkconfig--list | grep MySQL to see if MySQL is booting.

This time see not boot, execute # chkconfig mysqld on

Next we start to change the password, just when the service is started, there is a passage, through this statement to modify the initial password.

  

So execute #/usr/bin/mysqladmin-u root password ' newpwd '--here is the string that sets the password to "Newpwd".

4. Access to MySQL

  Execute the # mysql-u root-p command, log in, and enter the password you just set.

This allows the database to be manipulated using SQL statements.

5. Remote Connection

  In general, we develop using NAVICAT to connect to the database, and rarely operate directly on the server.

So we need to remotely connect to MySQL on the server.

  

After entering the information, there are several possible reasons for the connection error:

1, MySQL service is not up, enter the server to view the status.

2, the port is wrong (not the default 3306), or the port has a firewall.

3, MySQL does not allow remote connection. (This belongs to the above)

In that case, let's look at the bottom of the mouth.

Execute # NETSTAT-ANP, through which you can see that the port is open.

So change the settings in MySQL here.

First write here, Baidu is isn't allowed to connect MySQL server can solve this problem.

centos6.5 installing MySQL

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.