So some users complete a yum install of MySQL and expect to be able to use the following command to start the MySQL server:: /etc/init.d/mysql start only to get "No such file or directory"
So this is a quick post to help use the systemctl command.
You are likely to see this:
# systemctl list-unit-files | grep mysql
First I would recommend go to tools.percona.com and create a valid my.cnf file.
So the solution is easy, we just need to enable this so the database can start on server start up.
#systemctl enable mysqld.service
ln -s '/usr/lib/systemd/system/mysqld.service' '/etc/systemd/system/mysql.service'
ln -s '/usr/lib/systemd/system/mysqld.service' '/etc/systemd/system/multi-user.target.wants/mysqld.service'
#systemctl start mysqld
#systemctl list-unit-files | grep mysql
Now you should be good to go...