Hi I am working on ruby on rails project. after setting up all environment for the project but when I run localhost:3000 on my web browser it gives my this error
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (38)
Can someone help me how can I solve this problem?
Rails by default tries to connect to MySQL using a socket file. You probably want it to connect using a TCP connection.
Check your database.yml; it should look similar to this:
Notice the
hostparameter and the missingsocketparameter.