启动MYSQL服务
[root@ayuge bin]# service mysqld start
Redirecting to /bin/systemctl start mysqld.service
停止MYSQL服务
[root@ayuge bin]# service mysqld stop
Redirecting to /bin/systemctl stop mysqld.service
重启MYSQL服务
[root@ayuge bin]# service mysqld restart
Redirecting to /bin/systemctl restart mysqld.service
查看MYSQL服务
[root@ayuge bin]# service mysqld status
Redirecting to /bin/systemctl status mysqld.service
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2018-12-11 10:29:57 CST; 42s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 7546 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)
Process: 7528 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 7549 (mysqld)
CGroup: /system.slice/mysqld.service
└─7549 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid
Dec 11 10:29:57 host-BES systemd[1]: Starting MySQL Server...
Dec 11 10:29:57 host-BES systemd[1]: Started MySQL Server.
查看MYSQL系统配置
[root@ayuge ~]# cat /etc/my.cnf