PDA

View Full Version : Database Connection Problem



zigstonk
05-19-2010, 06:13 PM
I'm getting the following installation error:

--------------
Warning: Error establishing mySQL database connection. Correct user/password? Correct hostname? Database server running? in /home/***/public_html/***/libs/extensions/ezSQL/mysql/ez_sql_mysql.php on line 93

Warning: mySQL database connection is not active in /home/***/public_html/***/libs/extensions/ezSQL/mysql/ez_sql_mysql.php on line 125
--------------

- Hosting through Hostgator reseller acct
- set up under subdomain <xxx.domain.com)
- MySQL version - 5.1.30
- PHP version - 5.2.9
- phpmyadmin - 3.2.4

> Followed the install instructions specifically. Deleted everything. Started over twice.
> Contacted HostGator support - who offered this insight so far:

------------------
HGator: This is what was returned:

* Constructor - allow the user to perform a qucik connect at the
* same time as initialising the ezSQL_mysql class
*/

function ezSQL_mysql($dbuser='', $dbpassword='', $dbname='', $dbhost='localhost')

HGator: It seems the script has not been configured yet.
-------------------

here's my settings.php setup (which was configured prior to contacting HGator):

// EDIT THE FOLLOWING ONLY

// Database details
define("DB_USER", 'myname_username'); // Add your own database details
define("DB_PASSWORD", 'myname_password');
define("DB_NAME", 'myname_hotaru');
define("DB_HOST", 'localhost'); // You probably won't need to change this

define("DB_PREFIX", 'hotaru_'); // Database prefix, e.g. "hotaru_"
define("DB_LANG", 'en'); // Database language, e.g. "en"
define("DB_ENGINE", 'MyISAM'); // Database Engine, e.g. "MyISAM"
define('DB_CHARSET', 'utf8'); // Database Character Set (UTF8 is Recommended), e.g. "utf8"
define("DB_COLLATE", 'utf8_unicode_ci'); // Database Collation (UTF8 is Recommended), e.g. "utf8_unicode_ci"

// Paths
define('BASEURL', "http://****.com/"); // e.g. http://example.com/
// Needs trailing slash (/)

// DON'T EDIT ANYTHING BEYOND THIS POINT
------------------------------------------

Any insight/help is greatly appreciated.

louis
05-19-2010, 06:29 PM
I don't think you need "define("DB_PASSWORD", 'myname_password');" Just insert your "password" e.g. define("DB_PASSWORD", 'password');

zigstonk
05-19-2010, 06:33 PM
Louis - thanks that did the trick!! here's what worked:

// Database details
define("DB_USER", 'myname_username'); // Add your own database details
define("DB_PASSWORD", 'password');
define("DB_NAME", 'myname_hotaru');
define("DB_HOST", 'localhost'); // You probably won't need to change this