要配置MySQL的監(jiān)控和日志記錄,可以按照以下步驟操作:
performance_schema = ON
sudo systemctl restart mysql
log_error = /var/log/mysql/error.log
general_log = 1
general_log_file = /var/log/mysql/general.log
sudo systemctl restart mysql
tail -f /var/log/mysql/error.log
tail -f /var/log/mysql/general.log
通過以上步驟配置監(jiān)控和日志記錄,您可以更好地監(jiān)視MySQL的性能和故障排查。