I am trying to clone a repo and run it on my local machine. I do not have a database created, and I'm trying to manually create the database.yml file (my first time doing it). Iβm not quite sure what Iβm doing, and I continue to receive errors about connecting to the MySql server. Here is my database.yml file:
development: adapter: mysql host: 127.0.0.1 database: db/app_development username: root password:
I also tried localhost instead of 127.0.0.1, both give me errors when trying to create db by doing "bundle exec rake db: create" ... I get this error:
Can't connect to MySQL server on '127.0.0.1' (61) Couldn't create database for {"username"=>"root", "adapter"=>"mysql", "database"=>"db/app_development", "host"=>"127.0.0.1", "password"=>nil}, charset: utf8, collation: utf8_unicode_ci
I know that I am doing something wrong, but I cannot understand what it is. Do I need to start mysql server or something else?
This is the result when I run mysqld_safe:
120111 20:35:39 mysqld_safe Logging to '/usr/local/var/mysql/Matthew-Bermans-MacBook-Air.local.err'. 120111 20:35:39 mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql 120111 20:35:41 mysqld_safe mysqld from pid file /usr/local/var/mysql/Matthew-Bermans-MacBook-Air.local.pid ended
source share