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):

[email protected]:~/projects/pheonic/trunk/src/pheonic>
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})
FAILED
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/mysql_adapter.rb:330:in
`real_connect’: Can’t connect to local MySQL server through socket
‘/tmp/mysql.sock’ (111) (Mysql::Error)

from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/mysql_adapter.rb:330:in
`connect’

from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/mysql_adapter.rb:87:in
`initialize’

from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/mysql_adapter.rb:36:in
`mysql_connection’

from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/abstract/connection_specification.rb:251:in
`connection_without_query_cache=’

from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/query_cache.rb:54:in
`connection=’

from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/abstract/connection_specification.rb:220:in
`retrieve_connection’

from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in
`connection’

from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.rb:273:in
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:

[email protected]:~/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
Application
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
5.1

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.
http://wiseheartdesign.com

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs