addis_a
1
Hi everyone,
I’m new to rails and new to this group.
I’ve been going through Lynda.com tutorials and I got an error.
I was hoping somebody could help me out 
Here are the steps I’ve taken:
- rails new simple_cms -d mysql
- cd simple_cms
- bundle install
- rails s
- but when I check the localhost in the browser at
http://localhost:3000/
I get the following error message:
Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)
Unfortunately, this isn’t covered in the Lynda.com tutorial and I can’t
find anything useful on stack overflow, etc.
Your help to fix this problem would be greatly appreciated 
Thanks,
Michael
On Sun, Dec 14, 2014 at 2:00 AM, Michael D. [email protected]
wrote:
Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)
Is mysql installed on the machine?
On Sat, Dec 13, 2014 at 12:30 PM, Michael D. [email protected]
wrote:
- rails new simple_cms -d mysql
You selected MySQL as your database server, so
Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)
that means that you have to
- have the MySQL server installed on your system
- have it configured to be accessed via socket ‘/tmp/mysql.sock’
- have it running
At least one of those three is apparently not the case 
–
Hassan S. ------------------------ [email protected]
twitter: @hassan
Thanks for the help! It is greatly appreciated.
I spoke with the person who was helping me to set up the rails
environment.
He said that mysql had already been installed.
So I typed this command into terminal in order to start mysql:
mysql.server start
Then I got another error:
Unknown database ‘simple_cms_development’
this was resolved by typing the following into terminal:
bin/rake db:create db:migrate
The problem is resolved. Now I am able to successfully move forward with
the class.
Thanks again
-Michael