I apologize in advance as this is definitely not supported. Anyhow I hope you can get back to me on this.
I have recently installed hestiacp 1.6.0 on Ubuntu Server 20.04 LTS. However, I decided to move the /var/lib/mysql MariaDB datadir into another drive (another directory called /db located in partition /dev/sdb1).
• Issued commands:
sudo systemctl stop mariadb sudo cp -R -p /var/lib/mysql/* /db cp /etc/mysql/my.cnf /etc/mysql/my.cnf.backup
• Ensured to have (among the others) these lines present in this /etc/mysql/my.cnf:
[client] port=3306 socket=/db/mysqld.sock [mysqld] socket=/db/mysqld.sock datadir=/db
• Issued the following command:
sudo systemctl start mariadb
After that it seems that everything works fine: I can see the location of the new datadir and I can successfully create and drop a data base however, every 5 minutes I receive an email from my Hestia Control panel with the subject MySQL connection error on <> and the following content:
Can't connect to MySQL localhost ERROR 2002 (HY000): Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
After that I tried the following, however the email is still sent every 5 minutes (paranoid):
• Issued the following commands from root:
systemctl stop mariadb usermod -d /db/ mysql systemctl start mariadb chmod 777 /run chmod 777 /db
• Made a backup of these files and replaced /var/run/mysqld/mysqld.sock and /run/mysqld/mysqld.sock with /db/mysqld.sock:
/etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/logcheck/ignore.d.workstation/mariadb-server-10_6 /etc/logcheck/ignore.d.paranoid/mariadb-server-10_6 /etc/logcheck/ignore.d.server/mariadb-server-10_6
As of now the issue still stands and this is very annoying.
Any hint would be highly appreciated.
Thanks in advance.