mysql多实例

https://www.cnblogs.com/longren/p/11168317.html

step1:卸载所有与mysql,mariadb相关的东西

卸载mysql

# rpm -qa | grep mysql

yum -y remove  mysql-community-common-5.7.29-1.el7.x86_64
yum -y remove mysql-community-client-5.7.29-1.el7.x86_64
yum -y remove mysql-community-libs-5.7.29-1.el7.x86_64
yum -y remove mysql-community-server-5.7.29-1.el7.x86_64

卸载MariaDB

# rpm -qa | grep mariadb
将它们统统强制性卸载掉:
# rpm -e --nodeps mariadb-libs-5.5.35-3.el7.x86_64
# rpm -e --nodeps mariadb-5.5.35-3.el7.x86_64
# rpm -e --nodeps mariadb-server-5.5.35-3.el7.x86_64

#yum -y remove mariadb*

 

step2:安装依赖包
#yum -y install make gcc-c++ gcc  cmake bison-devel ncurses-devel libaio libaio-devel



step3:创建mysql用户
useradd mysql
 
step4:下载软件包,并解压到/usr/local/mysql        https://downloads.mysql.com/archives/community/
mkdir /usr/local/mysql 

tar -xvf mysql-5.6.32-linux-glibc2.5-x86_64.tar.gz -C /usr/local/mysql

 

port分开:默认3306

socket分开:默认(/var/lib/mysql/mysql.sock)

  mysqld服务运行时,产生socket文件,客户端访问数据库时,与socket文件建立连接

日志分开:默认(/var/log/mysqld.log)

数据目录分开:默认(/var/lib/mysql)

pid文件分开:默认(/var/run/mysqld/mysqld.pid)

 

mysql多实例

上一篇:CentOs安装mysql数据库


下一篇:MySQL基础_SQL语言