Change location of Percona XtraDB

Hi Folks,

After changing the location of my Percona XtraDB data files I am seeing this error:

[Server] Plugin mysqlx reported: ‘Setup of socket: ‘/var/lib/mysql/mysqlx.sock’ failed, can’t create lock file /var/lib/mysql/mysqlx.sock.lock’

I have moved the datafiles to /data/percona/mysql, I have set the permissions to be owned by the mysql user and mysql group.

In the my.cnf file I have set the following:

[client]
#socket=/var/lib/mysql/mysql.sock
socket=/data/percona/mysql/mysql.sock

[mysqld]
server-id=1
#datadir=/var/lib/mysql
datadir=/data/percona/mysql
#socket=/var/lib/mysql/mysql.sock
socket=/data/percona/mysql/mysql.sock
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

When I start the bootstrap service it starts and the mysql.sock & mysql.sock.lock files are created in the new disk location.

Any ideas what I missed?

Percona version is 8.0.23 on RHEL 8.10

Thx

Hello @mikejhathaway

Please add mysqlx-socket file path as well in mysqld section in mysql configuration:
mysqlx-socket=/data/percona/mysql/mysqlx.sock

Also make sure that the “mysql” user has the correct ownership and is able to create a file in the specified “socket” location.

Last; I see you are on 8.0.23. You are ~4y behind in terms of patching. You should consider upgrading to a newer minor patch

1 Like