I've upgraded to MySQL 8 and I can't find the error log! Where did it go?
On MySQL 8, you must configure the error log in /etc/my.cnf. If you have commented out the error log, it will look like this, starting with a # mark:
You will need to remove the # and ensure that the path to the file (and the file itself) exists and can be written to by the MySQL process. In this case, you should see something like:
[root@mysql8 ~]# ls -lah /var/log/mysqld.log
-rw-r----- 1 mysql mysql 23K Aug 11 04:16 /var/log/mysqld.log
Another common location for the MySQL log to be found is in /var/lib/mysql and be named after the server's hostname with a .err extension.
You can also find the MySQL error log by entering MySQL and issuing the following query:
mysql> show global variables like "log_error";