I have had lots of trouble with deploying my rails 3.0.10 application to Ubuntu 10.04 server with Passenger, Capistrano, nginx and MySQL (and even more trouble with apache2)
just a wild guess, any chance you are using localhost as the hostname? Try changing localhost to 127.0.0.1