These are chat archives for Sammykhaleel/RATAFIRE

28th
Jan 2015
Sammy khaleel
@Sammykhaleel
Jan 28 2015 01:10
I'm having trouble migrating the database Mysql2::Error: Can't connect to local MySQL server through socket
Fari Liang
@fariliang
Jan 28 2015 01:10
Can you get into your local MySQL?
Sammy khaleel
@Sammykhaleel
Jan 28 2015 01:11
how can i do that
Fari Liang
@fariliang
Jan 28 2015 01:13
use the credentials in database.yml
but I remembered that even with root you may not be able to log in to the local mysql, you have to find a way to add that root user.
And then use the root user to do a migration.
Sammy khaleel
@Sammykhaleel
Jan 28 2015 01:14
Ok i'm gonna look it up.
Fari Liang
@fariliang
Jan 28 2015 01:14
To start rails server you also need to do all of these: https://github.com/ratafire/ratafire/wiki/Development#start-rails-server
Sammy khaleel
@Sammykhaleel
Jan 28 2015 01:15
What is skynet in the database.yaml?
Fari Liang
@fariliang
Jan 28 2015 01:16
It is the password.
Sammy khaleel
@Sammykhaleel
Jan 28 2015 01:16
yes, is that your password?
Fari Liang
@fariliang
Jan 28 2015 01:16
No. That is the password for that local MySQl
You can see it in database.yml
Can you get into the local MySql with root?
Sammy khaleel
@Sammykhaleel
Jan 28 2015 01:25
Never worked with mysql before
im trying to get the server to run first
Fari Liang
@fariliang
Jan 28 2015 01:30
Yes, get it up first.
Sammy khaleel
@Sammykhaleel
Jan 28 2015 01:45
Did you install mysql through the terminal?
Fari Liang
@fariliang
Jan 28 2015 01:46
I install through brew.
Sammy khaleel
@Sammykhaleel
Jan 28 2015 01:46
Ok same for me
this what i get when i try to start the server ERROR! The server quit without updating PID file
Fari Liang
@fariliang
Jan 28 2015 01:50
You can get rid of the running server.
Sammy khaleel
@Sammykhaleel
Jan 28 2015 01:51
i did
Fari Liang
@fariliang
Jan 28 2015 03:38
Let me know if you run into any problem... I know that the starting rails server part is one of the hardest.
I have to configure sometime before I can turn it on on my the other computer.
Sammy khaleel
@Sammykhaleel
Jan 28 2015 03:49
Ok i will, let's see if i can get it to work in few hours, if not we may do some google hangout to work on that together how is that sound?
Fari Liang
@fariliang
Jan 28 2015 03:50
Sure. It is a bit hard to get the server running.
It is actually ok after you figure out how to turn on the MySql
Then you just need to follow what I wrote in that Wiki
Sammy khaleel
@Sammykhaleel
Jan 28 2015 03:55
I'm going to try his method to mysql server to start http://www.topito.com/wp-content/uploads/2013/01/code-34.gif
Fari Liang
@fariliang
Jan 28 2015 03:55
Haha :D
Fari Liang
@fariliang
Jan 28 2015 04:03
After you turn MySql on, if you can't rake db:migrate, I can send you an SQL dump to directly put on it.
Sammy khaleel
@Sammykhaleel
Jan 28 2015 04:04
When i do rake it through this error Mysql2::Error: Can't connect to local MySQL server through socket
Fari Liang
@fariliang
Jan 28 2015 04:11
'mysql.server status'
mysql.server status
See if it is running.
This command can be run at the ratafire file directory.
mysql.server start to start the server
Sammy khaleel
@Sammykhaleel
Jan 28 2015 04:22
Screen Shot 2015-01-27 at 11.19.51 PM.png
Fari Liang
@fariliang
Jan 28 2015 04:23
Oh, then it is the pid file problem.
ps aux | grep rails
Copy the pid from the grep command, and then do this:
kill -9 <pid>
This problem used to take me hours in searching, but it is just a server is still running, so once it is shut down the record will be clear.
ps aux | grep mysql for running mysql servers
Sammy khaleel
@Sammykhaleel
Jan 28 2015 04:29
Screen Shot 2015-01-27 at 11.29.30 PM.png
Fari Liang
@fariliang
Jan 28 2015 04:30
maybe it is the 244200 instead of the 85124?
I still can't remember which one is the pid, but one of them.
Sammy khaleel
@Sammykhaleel
Jan 28 2015 04:33
they were 4 process before i kill them all except the last it keep changing every time i run ps aux | grep mysql
Fari Liang
@fariliang
Jan 28 2015 04:34
That is weird...
If nothing is working, you can do brew uninstall mysql
kill them all, then install mysql again.
This time, when you want to turn it on, just use mysql.server start in the directory
I did it once like this as well.
Sammy khaleel
@Sammykhaleel
Jan 28 2015 04:35
I did that before limme try it again
Screen Shot 2015-01-27 at 11.36.52 PM.png
What? haha
Fari Liang
@fariliang
Jan 28 2015 04:37
Yeah, can you kill the running server now after you uninstall mysql?
This is strange.
Sammy khaleel
@Sammykhaleel
Jan 28 2015 04:38
nop, it didn't work
where my sql is installed?
maybe i have another version or somthing
Fari Liang
@fariliang
Jan 28 2015 04:39
That is possible.
Screen Shot 2015-01-27 at 11.40.02 PM.png
When I did ps aux | grep mysql it showed the directory of the pid file.
Sammy khaleel
@Sammykhaleel
Jan 28 2015 04:41
i did found mysql folder here /usr/local/var/mysql
i deleted it now im gonna try again
Sammy khaleel
@Sammykhaleel
Jan 28 2015 04:53
Mysql server now is runing :)
Fari Liang
@fariliang
Jan 28 2015 04:54
:D
Now you need to install redis
just install it from brew
redis is the server for background jobs
Sammy khaleel
@Sammykhaleel
Jan 28 2015 04:55
I did already but when i do rake db:migrate i get this Mysql2::Error: Access denied for user 'root'@'localhost' (using password: YES)
Fari Liang
@fariliang
Jan 28 2015 04:55
Yeah, I ran into this long time ago.
The way to solve it is to add that root user to your mysql server.
Just search how do you get into the mysql to add that user
Fari Liang
@fariliang
Jan 28 2015 05:00
root should be the default user, but for some reasons it is not added in brew's version of mysql.
Fari Liang
@fariliang
Jan 28 2015 18:35
I added discussion this week and a set of new rules to the homepage. Also created the barebone of the intro tutorial. You can see it if you login.
Screen Shot 2015-01-28 at 1.34.53 PM.png
Sammy khaleel
@Sammykhaleel
Jan 28 2015 21:13
Looks great!