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