Moved databases to new path and moved socket path but now get error can't connect to local server through socket?

In my environment I did the following... moving mariadb databases to a different path, i.e. /mnt/ext4/disk/external/mysql/ and the socket file to /mnt/ext4/disk/external/mysqld/ respectively. Steps are below:

systemctl stop MariaDB

mkdir -p /mnt/ext4/disk/external/mysql chown -R mysql:mysql /mnt/ext4/disk/external/mysql

mkdir -p /mnt/ext4/disk/external/mysqld chown -R mysqld:root /mnt/ext4/disk/external/mysqld

nano /etc/mysql/mariadb.conf.d/50-server.cnf

  1. datadir = /var/lib/mysql datadir = /mnt/ext4/disk/external/mysql

nano /etc/mysql/my.cnf

  1. socket = /run/mysqld/mysqld.sock socket = /mnt/ext4/disk/external/mysqld/mysqld.sock

rsync -av /var/lib/mysql/ /mnt/ext4/disk/external/mysql/ mv /var/lib/mysql /var/lib/mysql.original

chmod -R 755 /mnt/ext4/disk/external/mysqld

systemctl restart MariaDB find / -type s | grep sql | grep sock /mnt/ext4/disk/external/mysqld/mysqld.sock

systemctl status MariaDB

Now I see when I restart mariadb server... debian-start[11984]: ERROR 2002 (HY000): Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)

Is this an informational error? I seem to be able to connect to mariadb server just fine remotely or locally. The mariadb server is functional as far as I can tell. But not sure everything is 100% right?

Comments

 
No comments
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.
Back to Top