the default mysql logs are usually in the same directory as the db's which is /var/lib/mysql . At least this is so for rpm based servers.
You'll want to look for servername.err
Of course this is only related to the mysql server. Mysql code is completely different, you'll have to debug this within the application
WHMCS Guru - WHMCS addons, management, support and more. WHMCS Notifications Extended - Add slack, hipchat, SMS, pushover to WHMCS !!
Linux Problems? WHMCS Issues? +1-866-546-8914 (linux-14) or @whmcsguru on twitter!