Vote up! 1 Vote down! [FIXED]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' when running mysql database in docker, for a ruby on rails application Ruby on Rails. Troubleshooting. Issue 2025Q2 Log in or register to post comments Change host: localhost to host: 127.0.0.1 in config/database.yml, to make the connection over TCP/IP rather than local socket. Please login or register to post a comment.