Roundcube Community Forum

Release Support => Pending Issues => Topic started by: gbrentnell on January 17, 2007, 12:05:55 PM

Title: DATABASE ERROR: CONNECTION FAILED!
Post by: gbrentnell on January 17, 2007, 12:05:55 PM
//$rcmail_config['db_dsnw'] = 'mysql://root:properpassword@localhost/roundcube';
$rcmail_config['db_dsnw'] = 'mysql://rmail:properpassword@localhost/roundcube';


If I use the root and password for my DB connect string, everything works great. If I switch it to a named user, I get the DATABASE RROR: CONNECTION FAILED! error.

I'm able to use mysql -u rmail -pproperpassword from a command prompt and get logged into mysql correctly.

Using the MYSQL control panel, I've ensured that I've granted all privleges except 'grant' to the rmail user.

I've even tried 'add host from which this user can connect' and adding localhost to that list.

I for the life of me, can't figure out what I'm doing wrong.

Thanks!
Greg
Title: Re: DATABASE ERROR: CONNECTION FAILED!
Post by: morenintl on January 21, 2007, 02:16:20 PM
I am also getting
DATABASE ERROR: CONNECTION FAILED!
Unable to connect to the database!
Please contact your server-administrator.

Login to mySQL is successful using command prompt with the same username/password I use in db.inc.php
This is my db.inc.php (password removed):

<?php
$rcmail_config 
= array();
$rcmail_config['db_dsnw'] = 'mysql://ytbmailc_ytbmail:mypassword@localhost/ytbmailc_roundcubemail';
$rcmail_config['db_dsnr'] = '';
$rcmail_config['db_backend'] = 'db';
$rcmail_config['db_max_length'] = 512000// 500K
$rcmail_config['db_persistent'] = TRUE;
$rcmail_config['db_table_users'] = 'users';
$rcmail_config['db_table_identities'] = 'identities';
$rcmail_config['db_table_contacts'] = 'contacts';
$rcmail_config['db_table_session'] = 'session';
$rcmail_config['db_table_cache'] = 'cache';
$rcmail_config['db_table_messages'] = 'messages';
$rcmail_config['db_sequence_identities'] = 'identity_ids';
$rcmail_config['db_sequence_contacts'] = 'contact_ids';
$rcmail_config['db_sequence_cache'] = 'cache_ids';
$rcmail_config['db_sequence_messages'] = 'message_ids';

// end db config file
?>

I'm stumped at this point. Can anyone help?

Title: Re: DATABASE ERROR: CONNECTION FAILED!
Post by: arvoreen on January 23, 2007, 02:39:28 PM
After adjusting table/user privileges, did you reload mysql to activate the changes?

That's all I can come up with without a viable error message
Title: Re: DATABASE ERROR: CONNECTION FAILED!
Post by: morenintl on January 26, 2007, 04:27:45 PM
I removed the latest nightly version and re-installed RC 0.1beta and the problem has gone away.
Title: Re: DATABASE ERROR: CONNECTION FAILED!
Post by: Robin on September 25, 2007, 10:27:58 AM
If you followed the installation instructions on http://trac.roundcube.net/trac.cgi/wiki/Howto_Install. Try the following option: Rename the file located in /config/ "db.inc.php.dist" in to "db.inc.php" and refresh your page.
Title: Re: DATABASE ERROR: CONNECTION FAILED!
Post by: yitbos on September 25, 2007, 11:05:55 AM
I have the same problem. By any chance are you running it on IIS 5.0 ?
Title: Re: DATABASE ERROR: CONNECTION FAILED!
Post by: Austar on November 29, 2007, 09:02:57 AM

Same here.

Nothing worse than developers ignoring common errors. Oh well, that's that.

The price of something like Atmail is starting to appeal in light of the headaches with these other options.