Introduction
You may find that MySQL is not logging its errors into an error log or is logging into an unexpected file. This can happen if the MySQL configuration file does not explicitly set the error log or has the error log set incorrectly.
Procedure
To explicitly set the MySQL/MariaDB error log, you need to log into your server via SSH as 'root.' Or through the WHM: Terminal feature.
For MySQL:
- Open /etc/my.cnf in a text editor, such as nano or vi.
- Add the following line below the [mysqld] section.
log-error=/var/log/mysqld.log
- Restart MySQL using the following command.
/scripts/restartsrv_msyql
For MariaDB:
- Open /etc/my.cnf in a text editor, such as nano or vi.
- Add the following line below the [mariadb] section.
log_error=/var/log/mysqld.log
- Restart MySQL using the following command.
/scripts/restartsrv_msyql
Comments
0 comments
Article is closed for comments.