查询mysql的日志

-- 查找错误日志文件路径
mysql> show variables like "log_error";
-- 查找通用日志文件路径
mysql> show variables like "general_log_file";
-- 查找慢查询日志文件路径
mysql> show variables like "slow_query_log_file";

查找mysql的连接数:show status 查看所有状态参数,其中Threads_connected 当前的连接数。

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。
mysql> show global status like "%connect%";

查看mysql的运行时长

mysql> show global status like "uptime";

查看mysql的版本信息

mysql> select version();
mysql> show variables like '%version%';

  

  

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄