Error establishing a database connection

18 views
Skip to first unread message

Hman

unread,
Jul 22, 2007, 8:37:00 AM7/22/07
to Gelato CMS
I'm getting this everytime I try to complete install.php

'This either means that the username and password information in your
config.php file is incorrect or we can't contact the database server
at localhost. This could mean your host's database server is down.

* Are you sure you have the correct username and password?
* Are you sure that you have typed the correct hostname?
* Are you sure that the database server is running?
'

I took the following steps to install
1. Followed the Manual instructions
2. edited config.php (see below)
3. install.php

// MySql configuration
define('localhost', '[server]'); // Set the MySQL hostname
(generally "localhost")
define('har_gelatoxxx', '[database]'); // Set the MySQL database
gelato should use
define('har_harold2xxx', '[userdb]'); // Set the MySQL username
define('xxxpassword', '[dbpass]'); // Set the MySQL password
define('gel_', '[tableprefix]'); // Set the MySQL tables prefixes

jorge Condomí

unread,
Jul 22, 2007, 11:32:52 AM7/22/07
to Gelato CMS
Hello, the problem is the way you modified your config.php file. The
original file has:

define('DB_Server', '[server]'); // Set the MySQL hostname
(generally "localhost")
define('DB_name', '[database]'); // Set the MySQL database gelato
should use
define('DB_User', '[userdb]'); // Set the MySQL username
define('DB_Password', '[dbpass]'); // Set the MySQL password
define('Table_prefix', '[tableprefix]'); // Set the MySQL tables
prefixes

you need to replace the word [server] with your server name,
[database] with your database name and so on, the first parameter of
the php 'define' functions must be the same that is in the original
config.php file.

pecesama

unread,
Jul 22, 2007, 11:52:17 AM7/22/07
to Gelato CMS
Jorge is right, your config must be like this one,

// MySql configuration
define('DB_Server', 'localhost'); // Set the MySQL hostname
(generally "localhost")
define('DB_name', 'har_gelatoxxx'); // Set the MySQL database
gelato should use
define('DB_User', 'har_harold2xxx'); // Set the MySQL username
define('DB_Password', ''xxxpassword'); // Set the MySQL password
define('Table_prefix', 'gel_'); // Set the MySQL tables prefixes

Hman

unread,
Jul 22, 2007, 12:56:55 PM7/22/07
to Gelato CMS
I've tried the other way as well - is the [ ] brackets an issue?

Hman

unread,
Jul 22, 2007, 1:16:07 PM7/22/07
to Gelato CMS
The brackets were the issue - problem solved

pecesama

unread,
Jul 22, 2007, 10:32:19 PM7/22/07
to Gelato CMS
Good :)
Reply all
Reply to author
Forward
0 new messages