Centos7 Compiling and installing MySQL5.5

Source: Internet
Author: User

shutting down the firewall               

Systemctl Stop firewall
setenforce 0

Check if MySQL has been installed         

Rpm-qa |grep MySQL
[[email protected]~]# rpm-qa|grep mariadb centos7 default database
mariadb-libs-5.5.44-1.el7_1.x86_64
[[Email protected]~]# rpm-e--nodeps mariadb-libs-5.5.44-1.el7_1 Force Uninstall

Install the packages needed to compile the code       

[Email protected] ~]# yum-y install make gcc-c++ cmake bison-devel ncurses-devel libaio libaio-devel perl-data-dumper NE T-tools

Unzip and install           

[[email protected] ~]# tar zxf  mysql-5.5.17.tar.gz [[email protected] ~]# cd mysql-5.5.17/[[email protected]  Mysql-5.5.17]# cmake > -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 > -dwith_partition_storage_engine=1 > - Dextra_charsets=all > -ddefault_charset=utf8 > -ddefault_collation=utf8_general_ci [[ Email protected] mysql-5.5.17]# make && make install 

create MySQL user groups and users       

[[email protected] mysql-5.5.17]# groupadd mysql
[[email protected] mysql-5.5.17]# useradd-g mysql
mysql Modify MySQL directory permissions [[
email protected] mysql-5.5.17]# chown-r mysql:mysql/usr/local/mysql
start mysql
copy file
[[ Email protected] mysql-5.5.17]# cp support-files/mysql.server/etc/init.d/mysql
[[email protected] mysql-5.5.17]# Chkconfig MySQL on #开机启动
[[email protected] mysql-5.5.17]# service MySQL start #启动mysql
start ing MySQL ... success!
Netstat-lnp|grep 3306 #检查端口


Centos7 Compiling and installing MySQL5.5

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.