Author Topic: Unable to connect to the database!  (Read 5033 times)

Offline Arian

  • Newbie
  • *
  • Posts: 4
Unable to connect to the database!
« on: July 08, 2007, 10:41:57 AM »
Hello,

I try to setup RoundCube 0.1-rc1 on Windows XP (http://mail.arian.gr) with Apache 2.2.4, PHP 5.2.3, MySQL 5.00.41 and hMailServer 4.4 (Build 270) but without success. I'm getting always this error:

Code: [Select]
DB Error: DB Error: connect failed in E:\Sites\gr\arian\mail\program\include\rcube_db.inc on line 105

I have already install phpMyAdmin 2.10.2 and works fine. So -I suppose- there is not problem with the server setup itself. Installing mysql5.initial.sql work almost OK. I needed only to remove the DEFAULT from 'preferences' because MySQL didn't like it.

Code: [Select]
CREATE TABLE `users` (
 `user_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
 `username` varchar(128) NOT NULL,
 `mail_host` varchar(128) NOT NULL,
 `alias` varchar(128) NOT NULL,
 `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
 `last_login` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
 `language` varchar(5) NOT NULL DEFAULT 'en',
 `preferences` text NOT NULL,
 PRIMARY KEY(`user_id`)
) TYPE=MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;

Here also are my config php files, in case you need them for check.

Can please someone help me out? I try hard many times to fix it before to post this.

Thank you in advance....


Offline Iron Mountain

  • Newbie
  • *
  • Posts: 6
Re: Unable to connect to the database!
« Reply #1 on: July 08, 2007, 03:02:34 PM »
Hello

I would suggest you look at your database config and make sure it points to your mysql server with the correct user name and password.

It's this line here:
$rcmail_config['db_dsnw'] = 'mysql://username:password@sql_server_ip_or_localhost/DATABASE_name';
Iron Mountain Solar Powered Hosting with RoundCube
http://www.imountain.com

Offline Arian

  • Newbie
  • *
  • Posts: 4
Re: Unable to connect to the database!
« Reply #2 on: July 08, 2007, 03:40:21 PM »
I fix the connection problem. It was wrong port on php.ini. Thank you for your support about this.

Offline tesla

  • Newbie
  • *
  • Posts: 2
Re: Unable to connect to the database!
« Reply #3 on: July 22, 2007, 06:26:17 PM »
Hey Arian, Was your port 3306 in php.ini. I cannot get my db to connect either no matter what I do.

Quote from: Arian
I fix the connection problem. It was wrong port on php.ini. Thank you for your support about this.