Linux环境Mysql的使用
2021-05-02 小于 1 分钟
# 启动mysql
service mysqld start;
# or
systemctl start mysqld;
1
2
3
2
3
# 关闭mysql
service mysqld stop;
# or
systemctl stop mysqld;
1
2
3
2
3
# 查看Mysql的运行状态;
service mysqld status;
# or
systemctl status mysqld;
# or
systemctl -l status mysqld;
1
2
3
4
5
2
3
4
5
# 查看错误日志位置
cat /etc/my.cnf | grep log-error
1
# 查看错误日志
more /var/log/mysqld.log
1