Hey guys, I was playing around with the command "rake db_schema_dump" and kept getting this error "no such file or directory - /tmp/mysql.sock". I tried looking around to find this mysql.sock file; but no luck so far. Question: What is mysql.sock file? (how does it get created and how does it get used) I installed a MySQL DB and could not find this file. Could someone help this noob? Thank you in advance, AT -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
That file is the socket that is used to connect to the MySQL server. What distro are you using? The socket file may be in a different location for some distros. If the file isn''t anywhere, it probably means that MySQL is not running. Can you connect to MySQL using the command-line client or other means(I use Query Browser from my Windows workstation)? N00b wrote:> Hey guys, > > I was playing around with the command "rake db_schema_dump" and kept > getting this error "no such file or directory - /tmp/mysql.sock". I > tried looking around to find this mysql.sock file; but no luck so far. > > Question: > What is mysql.sock file? (how does it get created and how does it get > used) > I installed a MySQL DB and could not find this file. Could someone help > this noob? > > Thank you in advance, > > AT > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jason, Thank you for replying so quickly. MySQL version that I''m using is 4.1.21. I did a search from my C:/ directory (mysql.sock) and found nothing. Also, I could connect to MySQL using MySQL front in making sure that the MySQL is running. Is there any other possibility why this could happen? Thank you in advance, AT Jason Norris wrote:> That file is the socket that is used to connect to the MySQL server. > What distro are you using? The socket file may be in a different > location for some distros. > If the file isn''t anywhere, it probably means that MySQL is not running. > Can you connect to MySQL using the command-line client or other means(I > use Query Browser from my Windows workstation)?-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ah. You''re on Windows. I do develop on windows but I work on all my apps over a network share, so they''re always running on Linux. Makes deployment go much more smoothly. It seems like Rails is trying to connect to MySQL like it would on a *NIX box. I don''t know why that would be happening unless you didn''t use the Win32 binaries when you installed Ruby or something. Also, make sure your DB settings are correct. in database.yml. My recommendation: set up a linux box to develop on. Mine''s an older celeron 1.4, and it works just fine. =) N00b wrote:> Jason, > > Thank you for replying so quickly. > MySQL version that I''m using is 4.1.21. > I did a search from my C:/ directory (mysql.sock) and found nothing. > Also, I could connect to MySQL using MySQL front in making sure that the > MySQL is running. Is there any other possibility why this could happen? > > Thank you in advance, > > AT > > Jason Norris wrote: > >> That file is the socket that is used to connect to the MySQL server. >> What distro are you using? The socket file may be in a different >> location for some distros. >> If the file isn''t anywhere, it probably means that MySQL is not running. >> Can you connect to MySQL using the command-line client or other means(I >> use Query Browser from my Windows workstation)? >> > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jason, You are absolutely right. Rails is trying to connect to MySQL like it would on a UNIX box. I googled this problem and found out that instead of using localhost in your database.yml, I have to use "127.0.0.1". This works like charm. Thank you, LWT Jason Norris wrote:> Ah. You''re on Windows. > I do develop on windows but I work on all my apps over a network share, > so they''re always running on Linux. Makes deployment go much more > smoothly. It seems like Rails is trying to connect to MySQL like it > would on a *NIX box. I don''t know why that would be happening unless you > didn''t use the Win32 binaries when you installed Ruby or something. > Also, make sure your DB settings are correct. in database.yml. > My recommendation: set up a linux box to develop on. Mine''s an older > celeron 1.4, and it works just fine. =)-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Maybe Matching Threads
- Driving me nuts!!! - Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
- Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)
- connect': Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) (Mysql2
- mysql sock location
- Centos 6.6 Can't connect to local MySQL server through socket /var/lib/MySQL/MySQL.sock (error 2002)