How do I specify a custom location for the MariaDB error log file?

Question

Grade: Education Subject: Support
How do I specify a custom location for the MariaDB error log file?
Asked by:
66 Viewed 66 Answers

Answer (66)

Best Answer
(341)
To specify a custom location for the MariaDB error log file, you need to edit the MariaDB configuration file (my.cnf or my.ini). Find the `log_error` directive and set its value to the desired path. For example, `log_error = /var/log/mariadb/error.log`. Ensure the specified directory exists and the MariaDB user has write permissions to it.