#!
/bin/bash
# Get the MySQL error log file path
log_error_path=$(mysql -u your_username -p'your_password' -e "show variables like
'log_error';" | grep -oP '\s+\K\S+$')
# Get today's date in the format YYYY-MM-DD
today_date=$(date +'%Y-%m-%d')
# Construct the command to grep for errors in the log file
grep_command="grep \"$today_date\" $log_error_path | grep \"ERROR\""
# Execute the command and display the errors
eval $grep_command