Introduction
You may find that MySQL is not logging its error log.
This can happen if the MySQL Configuration File does not have the error log explicitly set.
Procedure
To explicitly set the MySQL/MariaDB, you would need to ensure the following option is enabled in the /etc/my.cnf file. Restarting MySQL/MariaDB afterward will be needed.
*** The syntax is different depending on what version of the database is being used ***
1. Log into your server via SSH as 'root'. Or through the WHM: Terminal feature.
2. If your server is running MySQL, use these steps:
Modify the /etc/my.cnf file.
Add the following line below the [mysqld] section.
[mysqld]
...
log-error=/var/log/mysqld.log
3. If your server is running MariaDB, use these steps:
Modify the /etc/my.cnf file.
Add the following line below the [mariadb] section:
[mariadb]
...
log_error=/var/log/mysqld.log
5. Save the /etc/my.cnf file.
6. Restart MySQL/MariaDB to have it take effect.
Command:
/scripts/restartsrv_msyql
Comments
0 comments
Article is closed for comments.