I have this configuration:
development: adapter: mysql2 encoding: utf8 database: my_db_name username: root password: my_password host: mysql://12
None of these anwers worked for me, I found Werner Bihl's answer that fixed the problem.
Getting "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'" error when setting up mysql database for Ruby on Rails app