Start the service on Linux and report an error
[ root@iZ25n5kdt0kZ ~]# service mysqld stop
Redirecting to /bin/systemctl stop mysqld.service
Solution:
First, use the CD command to switch the directory, for example: CD bin, and operate MySQL under the corresponding directory according to the specific error prompt
1. Use the following command to operate MySQL:
systemctl restart mysqld.service
systemctl start mysqld.service
systemctl stop mysqld.service
2. If the above operation doesn’t work, try the second scheme. The owner of MySQL is root, and MySQL is executed as a MySQL user. Of course, it can’t be written in. It’s a matter of system permissions. Chown – R mysql:mysql /var/lib/mysql/ That’s it
Link to the original text: https://blog.csdn.net/Qyq0498/article/details/107579247