CentOS MSYQL Installation and configuration

Source: Internet
Author: User

MySQL has the advantages of simple and easy to learn and small size, and is popular among beginners in programming development.

Tools/Materials
    • CentOS computers connected to the Internet
Install MySQL
    1. 1

      Installing MySQL under Centos 6.6 is simple,

      Yum List Mysql-server

    2. 2

      When there is only one time, you can directly

      Yum Install Mysql-server

      To install

    3. 3

      Select Y in the process to continue the installation and finally install successfully

      END
Setting up the MySQL service
    1. 1

      Start the MySQL service first

      Service mysqld Start

    2. 2

      Connect it and try it directly

      Mysql

      And then

      \q

      Close connection

    3. 3

      Set MySQL boot up

      Chkconfig mysqld on

    4. 4

      Open Port 3306 and save

      /sbin/iptables-i input-p TCP--dport 3306-j ACCEPT

      /etc/rc.d/init.d/iptables Save

      END
Modify password and set remote access
    1. 1

      Connect to MySQL Database

      Set Password

      Use MySQL;

      Update user set Password=password (' Password ') where user= ' root ';

      Flush privileges;

    2. 2

      Setting up MySQL remote access

      Grant all privileges on * * to ' root ' @ '% ' identified by ' 123456 ' with GRANT option;

      END
Solve MySQL garbled problem
    1. Find a configuration file, copy it to the/etc/directory, and name it MY.CNF

      (sometimes without my.cnf)

      Cp/usr/share/doc/mysql-server-5.1.73/my-medium.cnf/etc/my.cnf

    2. 2

      Vim MY.CNF

      Add both under [client] and [mysqld]

      Default-character-set=utf8

    3. 3

      Finally press ESC to enter

      : Wq

      Save exit

      END
Restart MySQL Service
    1. 1

      And then you restart the service.

      Service mysqld Restart

CentOS MSYQL Installation and configuration

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.