手工定制(单机多实例的模式)
vim /etc/systemd/system/mysql.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=/data/app/mysql5.7/bin/mysqld --defaults-file=/etc/my.cnf
LimitNOFILE = 5000
[root@db01 data]# mysqladmin -uroot -p password 123456
Enter password:
mysqladmin: [Warning] Using a password on the command line interface can be insecure.
Warning: Since password will be sent to server in plain text, use ssl connection to ensure password safety.
[root@db01 data]# mysql -uroot -p123456