mysql二进制版本安装后设置systemd启动

mysql二进制版本安装后设置systemd启动

https://dev.mysql.com/doc/mysql-secure-deployment-guide/5.7/en/secure-deployment-post-install.html

按如下方法设置systemd启动mysql后,要重启服务器

https://dev.mysql.com/doc/mysql-secure-deployment-guide/5.7/en/secure-deployment-post-install.html#secure-deployment-systemd-startup

疑问:

(1)$MYSQLD_OPTS有什么用?怎么用?

(2)EnvironmentFile=-/etc/sysconfig/mysql都能设置什么内容?

(3)这两个东西的作用好像是一样的,都是用来设置mysql的环境变量,似乎systemd可以读取$MYSQLD_OPTS的内容

systemctl set-environment MYSQLD_OPTS="--general_log=1"

https://dev.mysql.com/doc/refman/5.7/en/using-systemd.html#systemd-mysql-configuration

发表评论