Articles in this section

How to configure MariaDB to write log entries to the MariaDB log file on a Linux Plesk server?

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux

Question

  • MariaDB does not write log entries to the /var/log/mariadb/mariadb.log file of the Linux Plesk server. 

Cause

The configuration file of MariaDB on the server /etc/my.cnf does not have a line within it that specifies what file the errors need to be recorded into.

Answer

In order to specify the /var/log/mariadb/mariadb.log as the location for MariaDB log entries, you must do the following:

  1. Connect to the server via SSH
  2. Open  /etc/my.cnf for editing by using your favorite command-line text editor and add the following parameter under [mysqld] section:

    CONFIG_TEXT: log_error=/var/log/mariadb/mariadb.log

  3. Restart MariaDB in order to apply the changes:

    # systemctl restart mariadb

 

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.