mysql5.6 Installation

Source: Internet
Author: User

MySQL5.6 can only be compiled with CMake, so it is now written about the mysql5.6 installation and compilation method.

For CMake installation and compilation, see http://thankinglove.blog.51cto.com/2311485/1791792

#!/bin/bash#install_mysql-5.6.21.tar.gzcat /etc/passwd | grep  "^mysql:" if [ $?  -ne 0 ]then groupadd  mysqlficat /etc/passwd | grep  "^mysql : "if [ $? -ne 0 ]thenuseradd -g mysql mysql -s /usr/sbin/ nologinfi//create MySQL directory and data directory mkdir -p /usr/local/mysqlmkdir -p /usr/local/mysql/data// Change owner chown -r mysql:mysql /usr/local/mysql//Source package is placed in the/USR/LOCAL/SRC directory Cd /usr/local/srctar  xzvf mysql-5.6.21.tar.gzcd mysql-5.6.21cmake -dcmake_install_prefix=/usr/local/mysql  -dmysql_datadir=/usr/local/mysql/data -dsysconfdir=/etc -dwith_myisam_storage_engine=1 - Dwith_innobase_storage_engine=1 -dwith_memory_storage_engine=1 -dwith_readline=1 -dmysql_unix_ addr=/var/lib/mysql/mysql.sock -dmysql_tcp_port=3306 -denabled_local_infile=1 -dextra_charsets= All -ddefault_charset=utf8 -ddefault_collation=utf8_general_cimakemake installcp /usr/local/mysql/support-files/ my-default.cnf /usr/local/mysql/my.cnf//Initializing Database/usr/local/mysql/scripts/mysql_install_db --datadir=/ usr/local/mysql/data --basedir=/usr/local/mysql --user=mysql//Copy startup script cp /usr/local/mysql/ support-files/mysql.server /etc/init.d/mysqlchmod +x /etc/init.d/mysqlif [ -e / etc/my.cnf ]thenmv /etc/my.cnf /etc/my.cnf.bakfichkconfig --add mysqlchkconfig  Mysql on

Start MySQL after installation is complete

Service MySQL start//to see if MySQL started successfully netstat-tnlp | grep ": 3306" ps aux | grep MySQL


This article is from the "Ubuntu" blog, so be sure to keep this source http://thankinglove.blog.51cto.com/2311485/1791790

mysql5.6 Installation

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.