I'm trying like mad to get rails dbconsole to work (Rails 3.2.6, if that helps). The problem is that when I run the command, I get:
gems/railties-3.2.6/lib/rails/commands/dbconsole.rb:81:in `exec': Permission denied -
/usr/local/bin/mysql (Errno::EACCES)
I am using OS X Lion, and the usual way of running mysql at the command line works - it just doesn't work through rails dbconsole. The permissions on the /usr/local/bin/mysql are:
$ ls -la /usr/local/bin/mysql
lrwxr-xr-x 1 root admin 16 Mar 13 20:27 /usr/local/bin/mysql -> /usr/local/mysql
The user I am calling these commands from is in the 'Admin' group (as evidenced in the Preferences -> Users dialog)
Any ideas on how to fix this? What could be the cause of mysql being able to run at the command line but not through another program (ruby/rails in this case).
And while I'm at this permissions problem, could you point me to a decent article/book/method that will help me to understand the permissions system and help troubleshoot such problems in future?

/usr/local/mysql? The permissions on a symlink mean precious little. – Matthew Scharley Jun 16 '12 at 8:59wheel(the group forusr/local/bin/mysqlisadmin- as mentioned in the question) – Zabba Jun 16 '12 at 9:10ls -ld /usr /usr/local /usr/local/mysql, oftype mysql, and ofhead -n1 gems/railties-3.2.6/lib/rails/commands/dbconsole.rb. – Gilles Jun 17 '12 at 1:22