Centos 6.8 Installation mysql5.6

Source: Internet
Author: User
Tags yum repolist

1. Newly opened cloud server, need to detect whether the system comes with the installation of MySQL

# yum list installed | grep mysql

2. If you find a system that comes with MySQL, do it decisively

# yum -y remove mysql-libs.x86_64

3. Wherever you store files in the directory to execute, here to explain, because this MySQL source servers in the server abroad, so download speed will be relatively slow, fortunately mysql5.6 only 79M big, and mysql5.7 182M, so this is I do not want to install mysql5.7 reason

# wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm

4. Then execute this sentence and explain that this rpm is not a MySQL installation file, just two yum source files, executed after the/etc/yum.repos.d/ This directory has more Mysql-community-source.repo and Mysql-community.repo

rpm -ivh mysql-community-release-el6-5.noarch.rpm

5. At this time, you can use the Yum repolist mysql command to see if you already have MySQL installable files

all | grep mysql

6. Install the MySQL server command (yes):

# yum install mysql-community-server

7. After successful installation

# service mysqld start

8. Since MySQL has just been installed, the root password of MySQL is empty by default, so we need to log in in time with the root user of MySQL (first enter, no password), and change the password

update user set password=PASSWORD("这里输入root用户密码") where User=‘root‘; 

9. License (automatically create) a MySQL non-root AAA user, can access the TestDB database on localhost, the password is XXXX, and finally refresh the permissions

on testdb.* to [email protected] identified by ‘xxxx‘;# flush privileges;

10. Create a UTF8 table (if you need one) and then exit

CREATE DATABASE `database` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; # exit;

11. Check if MySQL is self-booting and set the self-start command

# chkconfig --list | grep mysqld# chkconfig mysqld on

12.mysql security settings (the system will ask you a few questions, can not understand the translation after the copy, basically all the way Yes):

# mysql_secure_installation

13. Good night.

# exit

Centos 6.8 Installation mysql5.6

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.