标签:tno desc soc base 初始 https target default 连接
二进制数据库链接:https://pan.baidu.com/s/18tpGgl1GWqtV2sWOAC38lA 提取码:x1vl
useradd -s /sbin/nologin mysql
[root@db02 ~]# mkdir /app/database -p [root@db01 database]# ln -s mysql-5.6.46-linux-glibc2.12-x86_64 mysql56 [root@db01 database]# ln -s mysql-8.0.18-linux-glibc2.12-x86_64 mysql80 [root@db01 database]# mv /etc/my.cnf /etc/my.cnf.bak [root@db01 database]# vim /etc/profile #注释以下信息 #export PATH=/app/database/mysql/bin:$PATH ? #复制一个新窗口 [root@db01 ~]# mysql -V -bash: mysql: command not found
rm -rf /data/331{7..9}/* rm -rf /binlog/331{7..9} mkdir -p /data/331{7..9}/data mkdir -p /binlog/331{7..9} chown -R mysql.mysql /data/* /binlog/*
cat > /data/3317/my.cnf <<EOF [mysqld] basedir=/app/database/mysql56 datadir=/data/3317/data socket=/tmp/mysql3317.sock log_error=/data/3317/mysql.log port=3317 server_id=17 log_bin=/binlog/3317/mysql-bin EOF ? cat > /data/3318/my.cnf <<EOF [mysqld] basedir=/app/database/mysql80 datadir=/data/3318/data socket=/tmp/mysql3318.sock log_error=/data/3318/mysql.log port=3318 server_id=18 log_bin=/binlog/3318/mysql-bin EOF
yum install libaio -y #5.6 /app/database/mysql56/scripts/mysql_install_db --user=mysql --datadir=/data/3317/data --basedir=/app/database/mysql56 ? #8.0 /app/database/mysql80/bin/mysqld --initialize-insecure --user=mysql --datadir=/data/3318/data --basedir=/app/database/mysql80
#5.6 cat >/etc/systemd/system/mysqld3317.service <<EOF [Unit] Description=MySQL Server Documentation=man:mysqld(8) Documentation=http://dev.mysql.com/doc/refman/en/using-systemd.html After=network.target After=syslog.target [Install] WantedBy=multi-user.target [Service] User=mysql Group=mysql ExecStart=/app/database/mysql56/bin/mysqld --defaults-file=/data/3317/my.cnf LimitNOFILE = 5000 EOF ? #8.0 cat >/etc/systemd/system/mysqld3318.service <<EOF [Unit] Description=MySQL Server Documentation=man:mysqld(8) Documentation=http://dev.mysql.com/doc/refman/en/using-systemd.html After=network.target After=syslog.target [Install] WantedBy=multi-user.target [Service] User=mysql Group=mysql ExecStart=/app/database/mysql80/bin/mysqld --defaults-file=/data/3318/my.cnf LimitNOFILE = 5000 EOF
systemctl start mysqld3317.service
systemctl enable mysqld3317.service
systemctl start mysqld3318.service
systemctl enable mysqld3318.service
标签:tno desc soc base 初始 https target default 连接
原文地址:https://www.cnblogs.com/Mercury-linux/p/12315099.html