Over two days streamlined caught my attention. I tried it, got nothing but instead a lot of achings. That made various sorts of problems corrupting Rails. I’ll continue to be up with it and hope they can fix their bug lately in future. After all now my rest of Rails apps run well.
I don’t scare of connecting problem since I think I really got it worked out on me. But My Rails ultimately teased to me:
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
It can’t find out mysqld.sock though it perfectly run on early morning before I set up streamlined. So I edit /etc/my.cnf and change ’socket’ location in section to fix through this, but nothing happened. So I roughly
sudo ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock
mysqld.sock in /var/run/mysqld/ shares 755 mood. Then everything is ok! What a silent world.
That’s all~
You can also specify the socket path in your rails database.yaml file:
production:
adapter: mysql
…
socket: /path/to/mysql.sock
Thank you Curtis!
I did it but failed, ever. Either specifying path in /etc/mysql/my.cnf or adding socket section in database.yml that didn’t help somehow, so I have to try to make a link. To my surprise, it works.
Anyway, Thank you for your comment here.
So in order of attempts i tried…
1. Re-installing rails (assuming it would find the mysqld.sock)
FAILED
2. Copying mysqld.sock to /tmp/
FAILED (couldn’t copy)
3. Putting the socket: /path/to/mysqld.sock in database.yml
FAILED
4. Creating a link with ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock
WORKED!
Thanks for the workaround.
I tried by adding the line
socket: /var/run/mysqld/mysqld.sock
to the database.yml file and it worked perfect !!
Thanks.
i can’t database.yml file! how to edit?!!!
I’m so dumb, I had a # in my password
Thanks Shravan! I missed it, but the filename actually is not mysql.sock but mysqld.sock. Reading too fast i guess.
О, это что-то, недавно где-то уже о таком слышала. Ваше мнение имеет основание быть. Вы понимаете то, о чем пишите. Немного почитав, хотелось бы узнать больше.
me funciono!! gracias!
Хех…
Почаще пишите смайлики, а то всё так как будто все очень серъёзно
Хм… что-то у меня ссылка не открывается, которую указали. Это у всех так?