MySQL Install on centos6.5

Source: Internet
Author: User

System: CentOS 6.5

Software: mysql-5.6.36.tar.gz,libunwind-1.2.tar.gz,google-perftools-1.9.tar.gz,cmake-3.4.1.tar.gz,epel-release-6-8.noarch.rpm


[Email protected] ~]# echo "192.168.40.35 king01" >>/etc/hosts


[Email protected] ~]# RPM-IVH epel-release-6-8.noarch.rpm


[email protected] ~]# Yum install-y libaio* ncurses-devel


[[email protected] ~]# useradd MySQL


[email protected] ~]# cat >>/etc/security/limits.conf <<eof

MySQL Soft nproc 2047

MySQL Hard Nproc 16384

MySQL Soft nofile 1024

MySQL Hard nofile 65536

Eof


[Email protected] ~]# tar zxvf libunwind-1.2.tar.gz

[Email protected] ~]# CD libunwind-1.2

[Email protected] libunwind-1.2]#./configure

[[email protected] libunwind-1.2]# make && make install


[Email protected] ~]# tar zxvf google-perftools-1.9.tar.gz

[Email protected] ~]# CD google-perftools-1.9

[Email protected] google-perftools-1.9]#./configure

[[email protected] google-perftools-1.9]# make && make install


[Email protected] ~]# tar zxvf cmake-3.4.1.tar.gz

[Email protected] ~]# CD cmake-3.4.1

[Email protected] cmake-3.4.1]#./configure

[[email protected] cmake-3.4.1]# gmake && make install


[Email protected] ~]# tar zxvf mysql-5.6.36.tar.gz


[Email protected] ~]# CD mysql-5.6.36


[Email protected] mysql-5.6.36]# CMake. -dcmake_install_prefix=/usr/local/mysql \

-dmysql_datadir=/usr/local/mysql/data \

-DSYSCONFDIR=/ETC \

-dmysql_unix_addr=/tmp/mysql.sock \

-dwith_innobase_storage_engine=1 \

-dwith_partition_storage_engine=1 \

-dwith_perfschema_storage_engine=1 \

-ddefault_charset=utf8 \

-ddefault_collation=utf8_general_ci


[[email protected] mysql-5.6.36]# make && make install


[Email protected] ~]#/usr/local/mysql/bin/resolveip KING01


[Email protected] ~]# CD mysql-5.6.36/support-files/


[email protected] support-files]# CP mysql.server/etc/init.d/mysqld


[Email protected] support-files]# chmod a+x/etc/init.d/mysqld


[Email protected] ~]# Cd/usr/local/mysql


[Email protected] mysql]# scripts/mysql_install_db--user=mysql--basedir=/usr/local/mysql--datadir=/usr/local/ Mysql/data


[Email protected] ~]# Vim/etc/profile

Path= $PATH:/usr/local/mysql/bin


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


[Email protected] ~]# Vi/usr/local/mysql/bin/mysqld_safe

Export ld_preload=/usr/local/lib/libtcmalloc.so


[[Email protected] ~]# service mysqld start

Starting MySQL. [OK]


[Email protected] ~]# NETSTAT-TUPLN |grep mysqld

TCP 0 0::: 3306:::* LISTEN 10101/mysqld


[Email protected] ~]# Lsof-n | grep tcmalloc

Mysqld 10101 mysql mem REG 8,2 2212357 441654/usr/local/lib/libtcmalloc.so.0.3.0


[Email protected] ~]# echo "/usr/local/mysql/lib" >/etc/ld.so.conf.d/mysql.conf

[Email protected] ~]# Ldconfig


[Email protected] ~]# mysqladmin-u root password ' abcd.1234 '

[Email protected] ~]# mysql-u root-pabcd.1234


mysql> show databases;

+--------------------+

| Database |

+--------------------+

| Information_schema |

| MySQL |

| Performance_schema |

| Test |

+--------------------+

4 rows in Set (0.01 sec)



MySQL Install on centos6.5

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.