What is the correct Percona 8.0.21 tag to replace Percona 8.0.15-6 CentOS

Hi,
In Presslabs Mysql Operator which uses Percona in the backend, I am currently using Percona 8.0.15-6 with the following hash:

percona@sha256:6bbb0e2830793107bae90569f34e59d4b442b250703b5d4b1e8a8996f61c8f2c

I would like to upgrade it to 8.0.21.

However, the Mysql container stops with the following error:

Can't start server: can't create PID file: Permission denied

[ERROR] [MY-013129] [Server] A message intended for a client cannot be sent there as no client-session is attached. Therefore, we're sending the information to the error-log instead: MY-000001 - Can't create/write to file '/var/run/mysqld/mysqld.pid' (OS errno 13 - Permission denied)
[ERROR] [MY-010092] [Server] Can't start server: can't create PID file: Permission denied

I have tried both following hashes (that I found on Docker Hub), but the outcome was the same:

percona/percona-server@sha256:b389bb76e2750e39a28bbf35ad95d438d12eb08b3a1576d0bde2d86773a64e79

percona@sha256:e6be2b95cb47d2e8b9d9611f25c898be72da2f47d185da5164f4883632d896c9

Please let me know what would be the correct tag/hash for Percona 8.0.21.

PS. At the time of testing, I tried 8.0.21. I am also good with any other versions equal or above 8.0.22.

Thanks

1 Like

Hello @imriss ,
I just pulled the latest percona:8
sha256:ffd7a2cfedf02d49e812e85383c0dbaf265255adf30a954feaddb4d38d48ddfa
and it started without issue.

$ docker run -e MYSQL_ROOT_PASSWORD=Percona1234 percona:8
...
2021-07-06T17:46:45.540771Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.23-14'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Percona Server (GPL), Release 14, Revision 3558242.
1 Like

Hello @matthewb , thank you, and sorry I missed your reply.

I agree that the docker image works fine by itself.

For my case, I am using it as part of Presslabs Mysql Operator. It seems that they run the docker image under the “mysql” user, not root. For Percona versions lower or equal to 8.0.19, there is no issues. However, for version higher than 8.0.19, it seems that it needs some kind of root level access, and the deployment under Presslabs Mysql Operator fails.

I would like to see if there is any workarounds. The error message is:

Can't create/write to file '/var/run/mysqld/mysqld.pid' (OS errno 13 - Permission denied)

Thanks

1 Like

You would need to have some way to launch the container with appropriate permissions. MySQL is always started as the root user and then is forked to run under the mysql user.

For that particular error, I would change the PID location. Create/edit a mysql config and add the following:

[mysql.server]
pid-file=/tmp/mysql.pid

See if that helps get around the permissions issue

1 Like

Hello @matthewb , sorry for the delay.
The /tmp/mysql.pid suggestion unblocked me. Thanks for the help.

1 Like