CentOS8.3.2011安装mysql-8.0.19-linux-glibc2.12-x86_64.tar.xz
以
下步骤是使用VMware Workstatin 15 Pro软件虚拟后的CentOS8.3.2011环境下,测试安装mysql-8.0.19-linux-glibc2.12-x86_64.tar.xz版本
设置开机启动mysql:
[root@tyjs09 ~]# cd /application/mysql/support-files
[root@tyjs09 support-files]# cp mysql.server /etc/init.d/mysqld
[root@tyjs09 support-files]# chkconfig --add mysqld
使用systemctl工具管理mysql:
[root@laiyue-20210601 /etc/systemd/system]#pwd
/etc/systemd/system
[root@laiyue-20210601 /etc/systemd/system]#vim mysqld.service
[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=/application/mysql/bin/mysqld --defaults-file=/etc/my.cnf
LimitNOFILE = 5000
[root@laiyue-20210601 /etc/systemd/system]#systemctl daemon-reload
[root@laiyue-20210601 /etc/systemd/system]#systemctl stop mysqld
[root@laiyue-20210601 /etc/systemd/system]#systemctl status mysqld
[root@laiyue-20210601 /etc/systemd/system]#systemctl start mysqld