a few days ago, our database service crashed, nothing recovered it, we only noticed it when all websites were down, any idea how to setup some recovery so something is monitoring the services to keep them up?
give more details. why is the database not working? what is in the logs? restarting does not work? is the disk space free?
mariadb config says log is over at /var/log/mysql/error.log
but file does not exist
log_error=/var/log/mysql/error.log
cd /var/log/
apache2/ exim4/ journal/ nginx/ redis/ sysstat/
apt/ hestia/ mod_evasive/ private/ roundcube/
clamav/ installer/ mysql/ proftpd/ runit/
below are whats in the log folder
README dovecot.log.3.gz mail.log.2.gz
alternatives.log dovecot.log.4.gz nginx
alternatives.log.1 dpkg.log php7.4-fpm.log
alternatives.log.2.gz dpkg.log.1 php7.4-fpm.log.1
alternatives.log.3.gz dpkg.log.2.gz php7.4-fpm.log.2.gz
apache2 dpkg.log.3.gz php7.4-fpm.log.3.gz
apt exim4 php8.2-fpm.log
auth.log fail2ban.log private
auth.log.1 fail2ban.log.1 roundcube
auth.log.2.gz fail2ban.log.2.gz runit
auth.log.3.gz fail2ban.log.3.gz syslog
auth.log.4.gz fail2ban.log.4.gz syslog.1
btmp faillog syslog.2.gz
btmp.1 fontconfig.log syslog.3.gz
cloud-init-output.log hestia syslog.4.gz
cloud-init.log journal sysstat
cron.log kern.log unattended-upgrades
cron.log.1 kern.log.1 vsftpd.log
cron.log.2.gz kern.log.2.gz vsftpd.log.1
cron.log.3.gz kern.log.3.gz vsftpd.log.2
cron.log.4.gz kern.log.4.gz vsftpd.log.3
dovecot.log lastlog vsftpd.log.4
dovecot.log.1 mail.log wtmp
dovecot.log.2.gz mail.log.1 xferlog
well check the contents of the logs related to the database, see what is written there, check the dates. This is the first step. Other services do not interest you like dovecot. Where do you have the database files? they are the most important in your problem.
i dont see any mysql folders or any files with a mysql prefix
i manually created the mysql folder but not seeing any files added to it, do i need to set permission to the folder so the service can write to it?
The dir must be created automatically when installing mysql so it’s strange you need to create it.
Yes.
chown mysql:adm /var/log/mysql/
chmod 2750 /var/log/mysql/
thanks that worked perfectly, i can see log file generating records