Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

Hi I installed mysql server on ubuntu 15.04 and gem mysql2 When run command rake db:create display error: Resque::Helpers will be gone with no replacement in Resque 2.0.0. Resque::Helpers will be gone with no replacement in Resque 2.0.0. [WARNING] The git gem requires git 1.6.0.0 or later, but only found 2.1.4. You should probably upgrade. Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2) Couldn’t create database for {“adapter”=>“mysql2”, “encoding”=>“utf8”, “reconnect”=>false, “database”=>“bd_development”, “pool”=>5, “username”=>“root”, “password”=>123, “socket”=>“/tmp/mysql.sock”}, charset: utf8, collation: utf8_unicode_ci (if you set the charset manually, make sure you have a matching collation) Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2) Couldn’t create database for {“adapter”=>“mysql2”, “encoding”=>“utf8”, “reconnect”=>false, “database”=>“bd_test”, “pool”=>5, “username”=>“root”, “password”=>123, “socket”=>“/tmp/mysql.sock”}, charset: utf8, collation: utf8_unicode_ci

database.yml:

development: adapter: mysql2 encoding: utf8 reconnect: false database: bd_development pool: 5 username: root password: 123 socket: /tmp/mysql.sock

How can solve this problem? please, help. Thank you

look in your mysql configuration file to see where the socket really is, it can vary depending on the system. Is the mysql server running?

look in your mysql configuration file to see where the socket really is, it can vary depending on the system. Is the mysql server running?

You may also get away with deleting the socket line altogether, which will fall back to TCP connection to 127.0.0.1:3306. It's not as fast as a socket, but nearly so.

Walter

Its was wrong path socket.Thank you!