ubuntu-14.04 System Installation mysql-5.6.21

Source: Internet
Author: User

1, pre-installation of MySQL preparation work
(1), download mysql-5.6.21.tar.gz from official website
(2), TAR-ZXVF mysql-5.6.21-tar.gz will generate mysql-5.6.21 directory
(3), download compressed package cmake-2.8.10.2.tar.gz decompression
TAR-ZXVF cmake-2.8.10.2.tar.gz
(4), create a folder at the current level mkdir-p/home/zxz/cmake-builder


(5), configure the installation folder./configure--prefix=/home/servera/cmake-builder
(6), go to Cmake-builder folder, run make and make install command
CD Cmake-builder
Make
Make install

(7), install the MySQL source code needed to compile the library
sudo apt-get install CMake
sudo aptitude Install Bison
sudo apt-get install build-essential Libncurses5-dev




2. Pre-security Preparation and folder settings
$ sudo groupadd MySQL


$sudouseradd-gmysqlmysql


$sudomkdir-p/var/mysql/


$sudomkdir-p/var/mysql/data/


$sudomkdir-p/var/mysql/log/


$sudo Mkdir/tmp/mysql.sock




3. Use the CMAK
TAR-ZXVF mysql-5.6.21.tar.gz
CD mysql-5.6.21
sudo cmake-dcmake_install_prefix=/usr/local/mysql \
-dmysql_unix_addr=/tmp/mysql.sock \
-ddefault_charset=utf8 \
-DDEFAULT_COLLATION=UTF8_GENERAL_CI \
-denabled_local_infile=1
-dmysql_datadir=/var/mysql/data \


4. Install MySQL
$ sudo make
$sudomakeinstall


5. Configure MySQL


sudo chmod +w/usr/local/mysql


Sudochown-r Mysql:mysql/usr/local/mysql


Sudochown-r mysql:mysql/var/mysql/


Sudoln-s/usr/local/mysql/lib/libmysqlclient.so.18/usr/lib/libmysqlclient.so.18


SUDOCP support-files/my-default.cnf/var/mysql/my.cnf


SUDOCP Support-files/mysql.server/etc/init.d/mysqld


SUDOCP support-files/my-default.cnf/etc/my.cnf


sudochown-rmysql:mysql*


6. mysql Initialization installation


sudo/usr/local/mysql/scripts/mysql_install_db \
--defaults-file=/var/mysql/my.cnf\
--basedir=/usr/local/mysql \
--datadir=/var/mysql/data \
--user=mysql


6. Start MYSQ
sudo service mysqld start

Copyright notice: This article blog original article. Blogs, without consent, may not be reproduced.

ubuntu-14.04 System Installation mysql-5.6.21

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.