docker-library / mysql

Docker Official Image packaging for MySQL Community Server
https://dev.mysql.com/
GNU General Public License v2.0
2.46k stars 2.19k forks source link

Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory. #1005

Closed rawr51919 closed 10 months ago

rawr51919 commented 11 months ago

I get this warning in the MySQL server console when I start a MySQL server in Docker. Is there any easy way to fix this?

[Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
qeepcologne commented 10 months ago

because of chmod 1777 /var/run/mysqld in Dockerfile: change it to 1770 and the warning disappears.

rawr51919 commented 10 months ago

I wasn't actually using that particular chmod command, but thank you, that helped Resolved by adding RUN chmod 1770 /var/run/mysqld to the Dockerfile