MySql教程

编译安装Mysql8

本文主要是介绍编译安装Mysql8,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
yum install -y wget
wget -O /etc/yum.repos.d/CentOS-Epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all && yum makecache
yum install -y vim make telnet lsof inotify-tools tree rdate ntp libaio gcc gcc-c++ psmisc net-tools screen expect sysstat hdparm traceroute zip unzip pcre pcre-devel zlib zlib-devel openssl openssl-devel tcping
cd /opt && mkdir apps conf src scripts data data/data_16303
chown -R swadmin:swadmin /opt/*
chmod 750 /opt/* -R
wget https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.4.9/binary/redhat/7/x86_64/percona-xtrabackup-24-2.4.9-1.el7.x86_64.rpm
yum install -y percona-xtrabackup-24-2.4.9-1.el7.x86_64.rpm
cd /opt/src
wget https://yw-du.oss-cn-hongkong.aliyuncs.com/mysql-8.0.19-linux-glibc2.12-x86_64.tar.xz
tar -xf mysql-8.0.19-linux-glibc2.12-x86_64.tar.xz -C /opt/apps/
cd /opt/apps/
mv mysql-8.0.19-linux-glibc2.12-x86_64/ mysql8
cd /opt/conf
wget https://yw-du.oss-cn-hongkong.aliyuncs.com/my.cnf
/opt/apps/mysql8/bin/mysqld --defaults-file=/opt/conf/my.cnf --initialize-insecure --user=swadmin   &
sleep 5
/opt/apps/mysql8/bin/mysqld --defaults-file=/opt/conf/my.cnf --user=swadmin &
sleep 5
这篇关于编译安装Mysql8的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!