# 复制 mysql.server 至/etc/init.d/重命名为 mysqld
cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld
# 修改 vi /etc/init.d/mysqld 配置文件
# 修改内容: 46-47
basedir=/usr/local/mysql
datadir=/usr/local/mysql/data
# 添加系统服务(service)启动信息
chkconfig --add mysqld # 服务名字为mysqld
#检查启动状态:
sudo systemctl is-enabled mysqld