Welcome to Working With Rails


Discussion Forums

Discuss all things Ruby on Rails with perhaps the web's most vibrant group of Ruby on Rails enthusiasts.
solaris+mongrel+restart db
2 Posts
solaris+mongrel+restart db

I am trying to upload new build through capistrino in my site but due to net issue it was stopped in the middle after i checked my mysql is stop i trying to restart it will give me error message "mysqladmin: connect to server at 'localhost' failed

error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)' Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists! "

i have also run the coomand svcadm restart cswmysql5

to restart. but not able start mysql service

any suggestions piece of code for restarting db

task :restart, :roles => [:web, :app, :db] do

run "/opt/csw/bin/mongrel_rails cluster::restart -C

{mongrel_config}" # or SMF run "sudo /usr/sbin/svcadm restart mongrel/cluster:snap" end

I'm no solaris expert, but you should have a @my.cnf@ file somewhere, assuming standard *nix layout it should be somewhere under @/etc@

Grep this file for the @socket=@ setting of your mysqld process, you should then change your @database.yml@ file in your Rails app to reflect the same socket file setting as is configured in your @my.cnf@ file.

2 Posts
Login to add your message