Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Ruby, Rails & MySQL - configuration problem

Reply
Thread Tools

Ruby, Rails & MySQL - configuration problem

 
 
Kenosis
Guest
Posts: n/a
 
      07-15-2005
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=<omitted :>

When I try to connect to my test database (per the Rails tutorial at
http://www.onlamp.com/pub/a/onlamp/2.../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

 
Reply With Quote
 
 
 
 
Kenosis
Guest
Posts: n/a
 
      07-15-2005
Of course, 5 minutes after I posted this I figured it out Thanks
never-the-less

Ken

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Rails Problem - Ms Sqlserver image columns and Rails erhan Ruby 0 06-30-2006 07:54 AM
the problem of install mysql driver using gem for Rails gao zhixin Ruby 1 02-12-2006 07:06 PM
Rails & MySQL login problem (#42000Access denied for user) Stephan Ruby 7 12-10-2005 10:20 PM
Rails problem - Trying code in "Rolling with Rails on Ruby" article colotechpro@yahoo.com Ruby 6 03-17-2005 12:15 AM
rails: gem install rails is bombing J. D. Ruby 9 11-04-2004 06:05 PM



Advertisments