From: Kenosis Date: 2005-07-16T01:40:52+09:00 Subject: Ruby, Rails & MySQL - configuration problem Greetings, Perhaps this should be posted to a mysql related group, however I'm guessing someone in the Ruby/Rails community may have seen this problem so I'm posting here hoping for some help. So, I have Ruby 1.8.x, Rails and MySQL installed and running on a RedHat Linux PC. Ruby compiles and runs fine as does Rails. The problem I'm having is w/MySQL configuration: in order to get the MySQL binary distribution I installed on my PC to run its self-tests and bench marks, I had to setup /etc/my.cfg as follows: [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock [mysql.server] user=mysql basedir=/var/lib [safe_mysqld] err-log=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid [client] socket=/tmp/mysql.sock password= When I try to connect to my test database (per the Rails tutorial at http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html), MySQL fails to find the client socket /tmp/mysql.sock. I had this same problem with MySQL's mysql-tests: adding the [client] section (as above) to my.cfg fixed this problem. Similarly, the MySQL sql-bench would not run w/out the [mysqld] socket set to /var/lib/mysql/mysql.sock Admittedly, I'm new to MySQL and Linux so there must be something obvious I'm missing. Lastly, as I progress through the aforementioned Rails tutorial, all works fine up to the point of trying to read from MySQL so I presume my configuration of database.yml is correct (the connection is not being deined.) Any help you can lend will, as always, be appreciated. Ken Hilton Kenosis LLC