Hello,
I am attempting to create a snap that is requiring writing a socket file to /var/run/mysql
.
022-11-15T13:09:34-05:00 systemd[1]: Started Service for snap application mysql-server.mysqld.
2022-11-15T13:09:35-05:00 mysql-server.mysqld[855079]: 2022-11-15T18:09:35.378582Z 0 [Warning] [MY-010101] [Server] Insecure configuration for --secure-file-priv: Location is accessible to all OS users. Consider choosing a different directory.
2022-11-15T13:09:35-05:00 mysql-server.mysqld[855079]: 2022-11-15T18:09:35.378691Z 0 [System] [MY-010116] [Server] /snap/mysql-server/x1/usr/sbin/mysqld (mysqld 8.0.31-0ubuntu0.22.04.1) starting as process 855079
2022-11-15T13:09:35-05:00 mysql-server.mysqld[855079]: 2022-11-15T18:09:35.391388Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-11-15T13:09:35-05:00 mysql-server.mysqld[855079]: 2022-11-15T18:09:35.587776Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2022-11-15T13:09:35-05:00 mysql-server.mysqld[855079]: 2022-11-15T18:09:35.793445Z 0 [ERROR] [MY-011300] [Server] Plugin mysqlx reported: 'Setup of socket: '/var/run/mysqld/mysqlx.sock' failed, can't create lock file /var/run/mysqld/mysqlx.sock.lock'
2022-11-15T13:09:35-05:00 mysql-server.mysqld[855079]: 2022-11-15T18:09:35.923237Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2022-11-15T13:09:35-05:00 mysql-server.mysqld[855079]: 2022-11-15T18:09:35.923304Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2022-11-15T13:09:35-05:00 mysql-server.mysqld[855079]: 2022-11-15T18:09:35.930884Z 0 [ERROR] [MY-010273] [Server] Could not create unix socket lock file /var/run/mysqld/mysqld.sock.lock.
2022-11-15T13:09:35-05:00 mysql-server.mysqld[855079]: 2022-11-15T18:09:35.930916Z 0 [ERROR] [MY-010268] [Server] Unable to setup unix socket lock file.
2022-11-15T13:09:35-05:00 mysql-server.mysqld[855079]: 2022-11-15T18:09:35.930931Z 0 [ERROR] [MY-010119] [Server] Aborting
I have tried setting the config option in the mysqld config:
sock = /etc/mysql/mysqld.sock
I found this which seemed relevant, but the solution does not appear to work in this case.
here is the repo for reference