# Change location of Percona XtraDB

**URL:** <https://forums.percona.com/t/change-location-of-percona-xtradb/37723>\
**Category:** Uncategorized\
**Tags:** percona\
**Created:** [April 24, 2025, 4:30pm UTC](https://forums.percona.com/t/change-location-of-percona-xtradb/37723 "2025-04-24T16:30:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikejhathaway](https://avatars.discourse-cdn.com/v4/letter/m/ecc23a/32.png) [@mikejhathaway](https://forums.percona.com/u/mikejhathaway)\
**Post date:** [April 24, 2025, 4:30pm UTC](https://forums.percona.com/t/change-location-of-percona-xtradb/37723/1 "2025-04-24T16:30:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lalit.choudhary](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/lalit.choudhary/32/51_2.png) [@lalit.choudhary](https://forums.percona.com/u/lalit.choudhary)\
**Post date:** [April 25, 2025, 6:42am UTC](https://forums.percona.com/t/change-location-of-percona-xtradb/37723/2 "2025-04-25T06:42:58Z")

</div>

Hello @mikejhathaway

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

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

---

<div class="post-metadata">

**Author:** ![CTutte](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ctutte/32/1341_2.png) [@CTutte](https://forums.percona.com/u/CTutte)\
**Post date:** [April 25, 2025, 6:26pm UTC](https://forums.percona.com/t/change-location-of-percona-xtradb/37723/3 "2025-04-25T18:26:27Z")

</div>

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
