# Database setup problem

**URL:** <https://www.ruby-forum.com/t/database-setup-problem/76794>\
**Category:** Radiant CMS\
**Created:** [November 21, 2006, 5:53am UTC](https://www.ruby-forum.com/t/database-setup-problem/76794 "2006-11-21T05:53:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Charles\_McKnight](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f475e1/32.png) [@Charles\_McKnight](https://www.ruby-forum.com/u/Charles_McKnight)\
**Post date:** [November 21, 2006, 5:53am UTC](https://www.ruby-forum.com/t/database-setup-problem/76794/1 "2006-11-21T05:53:27Z")

</div>

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

chuck@serenity:~/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:in`create\_tables’  
from script/setup\_database:19:in `run' from script/setup_database:9:in`run’  
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  
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!

---

<div class="post-metadata">

**Author:** ![Charles\_McKnight](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f475e1/32.png) [@Charles\_McKnight](https://www.ruby-forum.com/u/Charles_McKnight)\
**Post date:** [November 21, 2006, 6:03am UTC](https://www.ruby-forum.com/t/database-setup-problem/76794/2 "2006-11-21T06:03:29Z")

</div>

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