Forum: Ruby on Rails Fastcgi and mysql woes

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Scott W. (Guest)
on 2006-02-11 03:29
(Received via mailing list)
Hi,

I have been heck of a time to get mysql and fastcgi to
work properly on my Mac OS X  box.  I keep getting the
following error:  Can't connect to local MySQL server
through socket '/opt/local/var/run/mysql5/mysqld.sock'
(13)

I have even tried commenting out the "socket" option
in my database.yml but it still gives me the same
error.  I'm ok when I use webrick, but apache is not
being nice.  I can connect via sockets to mysql like
"mysql -uroot -ppassword
--socket=/opt/local/var/run/mysql5/mysqld.sock

So I'm guessing its an Apache or Fastcgi problem.
Here is my config inside apache:

LoadModule fastcgi_module
/opt/local/apache2/modules/mod_fastcgi.so

<IfModule mod_fastcgi.c>
   AddHandler fastcgi-script .fcgi
   FastCgiIpcDir /tmp/fcgi_ipc/
 FastCgiServer /tmp/railstest/public/dispatch.fcgi
-initial-env RAILS_ENV=development -processes 2
-idle-timeout 60
</IfModule>


Any ideas?

scott


----------------------------------------------------------------------------------------------------
What's an Intel chip doing in a Mac? A whole lor more that it's ever
done in a PC.

My Digital Life - http://scottwalter.com/blog
Pro:Blog - http://scottwalter.com/problog
Dick D. (Guest)
on 2006-02-11 18:18
(Received via mailing list)
On 11/02/06, Scott W. <removed_email_address@domain.invalid> wrote:

> I have even tried commenting out the "socket" option
> in my database.yml but it still gives me the same
> error.  I'm ok when I use webrick, but apache is not
> being nice.  I can connect via sockets to mysql like
> "mysql -uroot -ppassword

What does database.yml look like?

Remember apache runs as a different user, so check the
permissions on the socket (and the directories containing it).

> --socket=/opt/local/var/run/mysql5/mysqld.sock

--
Rasputin :: Jack of All Trades - Master of Nuns
http://number9.hellooperator.net/
This topic is locked and can not be replied to.