CentOS Install Mysql 5.6

Source: Internet
Author: User

Environment:

CentOS 6.5 64bit

SOURCE Package Path:

/usr/local/src

Required Packages:

Mysql-5.6.20.tar.gzgmock-1.6.0.zip

Installation path:

/opt/mysql

installation process

[[email protected] ~]# useradd -m -s /sbin/nologin mysql[[email  protected] ~]# yum -y install gcc gcc-c++ autoconf automake zlib*  libxml* ncurses-devel libtool-ltdl-devel* make cmake bison libtool m4  libstdc++-devel unzip[[email protected] ~]# mkdir /db/mysql -p[[email  protected] ~]# chown -r mysql:mysql /db/mysql[[email protected] ~]#  mkdir /opt/mysql/pid -p[[email protected] ~]# cd /usr/local/src[[email  protected] src]# tar -zxvf mysql-5.6.20.tar.gz [[email protected] src ]# cd mysql-5.6.20[[email protected] mysql-5.6.20]# mkdir source_downloads[[ Email protected] mysql-5.6.20]# cd source_downloads[[email protected] source_ downloads]# unzip gmock-1.6.0.zip[[email protected] source_downloads]# cd gmock-1.6.0[[email protected]  Gmock-1.6.0]# ./configure[[email protected] gmock-1.6.0]# make[[email protected]  GMOCK-1.6.0]# CD&NBSP, .... /.. /[[email protected] mysql-5.6.20]# more configure.mysql cmake -dcmake_install_ Prefix=/opt/mysql -dmysql_datadir=/db/mysql -dmysql_unix_addr=/opt/mysql/pid/mysql.sock -dmysql _tcp_port=33306 -ddefault_charset=utf8 -ddefault_collation=utf8_general_ci -dextra_charsets=all  -DWITH_EMBEDDED_SERVER=0 -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1  -dwith_memory_storage_engine=1 -dwith_archive_storage_engine=1 -dwith_blackhole_storage_engine=1  -dwith_federated_storage_engine=1 -dwith_readline=1 -denabled_local_infile=1 -dmysql_user =mysql -dwith_debug=0 -dwith_ssl=yes[[email protected] mysql-5.6.20]#&nbsP;sh configure.mysql [[email protected] mysql-5.6.20]# make[[email protected]  mysql-5.6.20]# make install[[email protected] mysql-5.6.20]# cd /opt/mysql /[[email protected] mysql]# cp support-files/mysql.server /etc/init.d/mysqld[[email  protected] mysql]# cp support-files/my-default.cnf /etc/my.cnf[[email protected ] mysql]# scripts/mysql_install_db --basedir=/opt/mysql/ --datadir=/db/mysql/ --user= Mysql

Start MySQL:

[Email protected] mysql]#/etc/init.d/mysqld startstarting MySQL ... error! The server quit without updating PID file (/db/mysql/master.mysql.org.pid).

To view the/db/mysql/master.mysql.org.err log, report the following error:

2014-11-28 00:22:06 36048 [ERROR] Can ' t start server:bind on UNIX socket:permission denied2014-11-28 00:22:06 36048 [ER ROR] Do already has another MYSQLD server running on socket:/opt/mysql/pid/mysql.sock?

To modify the/opt/mysql/pid directory permissions:

[Email protected] mysql]# Chmod-r 777 Pid/

[[email protected] mysql]#/etc/init.d/mysqld start

Starting MySQL. success!

Started successfully.


To modify/etc/profile, add the following statement:

Export path= $PATH:/opt/mysql/bin

[Email protected] mysql]# Source/etc/profile

Enable MySQL-related commands to be used directly


This article is from the "Me & Done" blog, so be sure to keep this source http://medone.blog.51cto.com/9469723/1584035

CentOS Install 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.