You may use the following procedure to locate the MySQL or MariaDB log.
- Login to the server via SSH or Terminal as the root user
- Issue the following command:
mysql -e "show variables like '%log%';"
- Locate the option labeled "log_error" to find the path to the log file
If the database is down or will not respond to the above command, you may also check the configuration file to see if the log location is specified there: