CentOS 6.7 Installation MySQL 5.6

Source: Internet
Author: User

1. Preparation before installation

1 Yum Install GCC GCC Perl 2 Yum " Development Tools " 3 Yum Install bzip2-devel libcurl-devel

2, installation CMake

1 wget https://cmake.org/files/v3.4/cmake-3.4.1.tar.gz2tar -zxvf cmake-3.4. 1. Tar . GZ 3 cd cmake-3.4. 1 4 ./Configure5make makeinstall

3. Download MySQL 5.6

1 wget http://cdn.mysql.com//downloads/mysql-5.6/mysql-5.6.28.tar.gz 2 tar -zxvf mysql-5.6. . Tar . GZ 3 CD mysql-5.6.  -

4. Configuring compilation parameters

1 CMake2-dcmake_install_prefix=/usr/local/MySQL3-dmysql_unix_addr=/usr/local/mysql/Mysql.sock4-ddefault_charset=UTF85-ddefault_collation=Utf8_general_ci6-dwith_innobase_storage_engine=1 7-dwith_archive_storage_engine=1 8-dwith_blackhole_storage_engine=1 9-dmysql_datadir=/data/MySQLdbTen-dmysql_tcp_port=3306  One-denable_downloads=1

5. Compile and install (longer time)

 Make  Make Install

6. Configure user groups

1 Groupadd MySQL 2 useradd-r-g MySQL MySQL

7. Set up the database directory (/DATA/MYSQLDB)

mkdir -p/data/mysqldb

8. Change permissions

1 chown -R mysql:mysql/usr/local/MySQL2chown -R mysql:mysql/data/mysqldb

9. configuration file default location/usr/local/mysql/my.cnf (delete/etc/my.cnf)

1 rm /etc/my.cnf2chown mysql:mysql/usr/local/mysql/my.cnf

10. Start MySQL

1 CP support-files/mysql.server/etc/init.d/mysqld2 /etc/init.d/mysqld start

Startup success will occur

    Starting MySQL. success!

11. Run the Security Settings script

/usr/local/mysql/bin/mysql_secure_installation

CentOS 6.7 Installation MySQL 5.6

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.