I’m hoping someone can point me in the right direction. I’ve successfully moved the datadir to a new location and Percona server starts up.
- Original location: /var/lib/mysql
- New location: /u01/data/mysql
- Permissions and ownership were retained (used rsync -av to transfer files)
- The original directory has been rename to /var/lib/mysql.bak
- The my.cnf file has been modified to use the new datadir location
- datadir=/u01/data/mysql
- socket=/u01/data/mysql/mysql.sock
- When MySQL starts the mysql.sock and mysql.sock.lock are now created in the new datadir location.
However there is a recurring error in the mysqld.log file:
- [ERROR] [MY-011300] [Server] Plugin mysqlx reported: 'Setup of socket: '/var/lib/mysql/mysqlx.sock' failed, can't create lock file /var/lib/mysql/mysqlx.sock.lock'
It seems that the default plugin named mysqlx (Type: daemon) is trying to create the mysqlx.sock and mysql.sock.lock files in the original default datadir directory. However it cannot do that as the original /var/lib/mysql directory in my installation has been renamed to mysql.bak.
Is there an additional step(s) required when moving the datadir to ensure the mysqlx daemon starts up properly and its related files are created in the new datadir location?