mysql安装完成后不能用命令
systemctl start mysqld #启动
systemctl stop mysqld #停止
解决办法:
find / -name mysql.server
会出现服务路径:
/home/swkj/tools/mysql/mysql-5.7.31-linux-glibc2.12-x86_64/support-files/mysql.server
然后根据路径启动
/home/swkj/tools/mysql/mysql-5.7.31-linux-glibc2.12-x86_64/support-files/mysql.server start
Shutting down MySQL.... SUCCESS! 输出这一行,就说明执行成功
用/home/swkj/tools/mysql/mysql-5.7.31-linux-glibc2.12-x86_64/support-files/mysql.server stop
可以关闭成功