Centos 6.10 mysql 5.7.22多实例安装

依赖安装

yum -y install gcc gcc-c++ glibc numactl perl-Time-HiRes per-devel libaio libstdc++ libstdc ncurses-libs wget unzip ntp

下载mysql

wget -N -p /root/ https://cdn.mysql.com/archives/mysql-5.7/mysql-5.7.22-linux-glibc2.12-x86_64.tar.gz

创建用户

groupadd mysql && useradd -r -g mysql -s /bin/false mysql

解压mysql

tar -zxvf /root/mysql-5.7.22-linux-glibc2.12-x86_64.tar.gz -C /root/

重命名到其它目录 

mv /root/mysql-5.7.22-linux-glibc2.12-x86_64 /usr/local/mysql

创建目录

mkdir -p /var/run/mysqld && mkdir -p /usr/local/mysql/data3306 /usr/local/mysql/binlog3306 && mkdir -p /usr/local/mysql/data3307 /usr/local/mysql/binlog3307

赋予权限

chmod 750 /var/run/mysqld /usr/local/mysql/data* /usr/local/mysql/binlog* && chown -R mysql:mysql /usr/local/mysql/ /v

你可能感兴趣的:(Centos,Mysql)