I have built a three-node galera cluster, so it is a Master-Master replication structure. But sometimes the first node goes down and I can't find the problem causing this. I am only looking at /var/log/syslog files. Where should I look to find the problems? Is there other log files I can look on production environment? Where the database admins looks for db errors?
Asked
Active
Viewed 45 times
1 Answers
3
You should look at the MariaDB error log. The authoritative documentation on this is found in the MariaDB Knowledgebase: Error Log.
If you're using Ubuntu, then I assume you have systemd, which means you can also see the error log with:
journalctl -u mariadb.service
... although I personally don't think this is as good/nice as MariaDB's own error log file. So it might be worth finding that, or configuring MariaDB to produce an error log.
In the mariadb client, you should check the following status variable:
SHOW VARIABLES LIKE 'log_error';
If this is empty, then by default the error log is written to the ${hostname}.err file in your datadir directory, and the datadir can be found with:
SHOW VARIABLES LIKE 'datadir';
For more details, please see the documentation page I linked to above.
dbdemon
- 6,964
- 4
- 21
- 40