giovtorres / docker-centos7-slurm

Slurm Docker Container on CentOS 7
MIT License
85 stars 56 forks source link

Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' #44

Closed avatar-lavventura closed 2 years ago

avatar-lavventura commented 2 years ago

Thank you for your work. I tried to convert the Dockerfile in ubuntu format.

But I keep getting following error from mysql:

$ /usr/bin/mysqld_safe
220422 10:39:58 mysqld_safe Logging to syslog.
220422 10:39:58 mysqld_safe Starting mariadbd daemon with databases from /var/lib/mysql
$ mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2)

Do you have any idea how could this be solved?

giovtorres commented 2 years ago

I'm not sure if what's in this project can be directly transposed to Ubuntu without some tweaking. It appears MySQL is not starting up properly. I would check the MySQL logs for clues.

avatar-lavventura commented 2 years ago

I was able to make it work in ubuntu. Not related to mysql but for munge I had to do following permission setup in the Dockerfile:

RUN chown root:munge -R /etc/munge /etc/munge/munge.key /var/lib/munge