多实例安装mysql数据库
时间:2021-07-01 10:21:17
帮助过:27人阅读
1:yum安装数据库
rpm -q mariadb-server
yum install mariadb-server
2:启动服务
systemctl start mariadb
3:数据库路径、文件

4:配置文件mysql.sock文件(本机通讯)

5:新建文件夹并指定所有者、所属组

6:生成数据库及查看程序路径
mysql_install_db --datadir=/mysqldb/3306/data --user=mysql --basedir=/usr
mysql_install_db --datadir=/mysqldb/3307/data --user=mysql --basedir=/usr
mysql_install_db --datadir=/mysqldb/3308/data --user=mysql --basedir=/usr

7:准备配置文件(注意添加端口默认3306)

8:关闭以前的3306端口
[root@centos7 /mysqldb/3306]#systemctl stop mariadb
9:拷贝启动脚本并把权限改为700


10:启动服务

11:连接mysql数据库3307

多实例安装mysql数据库
标签:shadow 启动服务 新建文件夹 system text png 端口 /usr 文件夹