I am running Ubuntu 10.04, Rails 3.0.7, Ruby 1.9.2
I started with this link: Convert a Ruby on Rails app from sqlite to MySQL?
I successfully installed 'mysql2'
database.yml :
# SQLite version 3.x
# gem install sqlite3
development:
adapter: mysql2
database: db/development.mysql2
pool: 5
timeout: 5000
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: mysql2
database: db/test.mysql2
pool: 5
timeout: 5000
production:
adapter: mysql2
database: db/production.mysql2
pool: 5
timeout: 5000
When i get to step 5 :
rake db:create
I get this error (with trace):
** Invoke db:create (first_time)
** Invoke db:load_config (first_time)
** Invoke rails_env (first_time)
** Execute rails_env
** Execute db:load_config
** Execute db:create
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Couldn't create database for {"adapter"=>"mysql2", "database"=>"db/test.mysql2",
"pool"=>5, "timeout"=>5000}, charset: utf8, collation: utf8_unicode_ci
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Couldn't create database for {"adapter"=>"mysql2", "database"=>"db/development.mysql2",
"pool"=>5, "timeout"=>5000}, charset: utf8, collation: utf8_unicode_ci
Any suggestions?