Database setup problem

Hi All,

I’m new to using Radiant although I’ve been doing some things in Rails
for a bit. When I set up a test project to learn how to use Radiant, I
tried to use the MySQL database (I’ve been using it for a while as well,
btw) and got the following errors (after following the installation
instructions in the handbook):

script/setup_database development
Run setup_database --help for information on additional options.

Loading development environment…OK

WARNING! This script will overwrite information currently stored in the
database “radiant_dev”. Are you sure you want to continue? [Yn]

Creating tables…
– drop_table(“config”)
– create_table(“config”, {:force=>true})
`real_connect’: Can’t connect to local MySQL server through socket
‘/tmp/mysql.sock’ (111) (Mysql::Error)








method_missing' ... 8 levels... from script/setup_database:99:increate_tables’
from script/setup_database:19:in run' from script/setup_database:9:inrun’
from script/setup_database:297

I ran a script/about and show the following:

chuck@serenity:~/projects/pheonic/trunk/src/pheonic> script/about
About your application’s environment
Ruby version 1.8.4 (i586-linux)
RubyGems version 0.9.0
Rails version 1.1.6
Active Record version 1.14.4
Action Pack version 1.12.5
Action Web Service version 1.1.6
Action Mailer version 1.2.5
Active Support version 1.3.1
root /home/chuck/projects/pheonic/trunk/src/pheonic
Environment development
Database adapter mysql

and I’m using the following version of MySQL:

mysql Ver 14.12 Distrib 5.0.18, for suse-linux (i686) using readline

I copied the database.mysql.yml file into database.yml and set the user
name and password to the same values that I used in the grant privileges
SQL. This is sort of a head scratcher for me, but I’m digging through
code trying to figure out what I’ve misconfigured.

Any clues appreciated!

Charles McKnight wrote:

local MySQL server through socket ‘/tmp/mysql.sock’ (111) (Mysql::Error)
There’s the problem. If you are using sockets with Radiant you should
set up the path to the socket in database so that it is correct.
Otherwise you should set the configuration so that it connects over the
appropriate port. My suggestion is to look at the database configuration
for another Rails app that you have running on MySQL and use it as a
reference for configuring your Radiant install.

John L.