Database Error: Unable to connect to the database: Could not connect to MySQL

Need help with the Administration of your Joomla! 1.5 site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
toleds
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Jul 15, 2008 2:08 pm

Re: Database Error: Unable to connect to the database: Could not

Post by toleds » Tue Jul 15, 2008 2:15 pm

Hi Guys,

Not sure if this would be the solution to your problem on db connection. I also encountered the same thing and after using the script provided above i found out that mysql user is limited to 16 chars (including underscore). So i limit my user as well as db to 16 chars and yep i managed to login successfully.

if this is not the solution to the problem then i guess yours is more serious than mine.

--
my 2 cents.

User avatar
ircmaxell
Joomla! Ace
Joomla! Ace
Posts: 1926
Joined: Thu Nov 10, 2005 3:10 am
Location: New Jersey, USA
Contact:

Re: Database Error: Unable to connect to the database: Could not

Post by ircmaxell » Tue Jul 15, 2008 2:26 pm

Right from dev.mysql.com:
MySQL usernames can be up to 16 characters long. This limit is hard-coded in the MySQL servers and clients, and trying to circumvent it by modifying the definitions of the tables in the mysql database does not work.
http://dev.mysql.com/doc/refman/5.0/en/user-names.html
Anthony Ferrara - Core Team - Development Coordinator - Bug Squad - JSST

http://moovum.com/ - The Bird is in the air! Get Mollom Anti-Spam on your Joomla! website with Moovur...
http://www.joomlaperformance.com For All Your Joomla Performance Needs

Kay
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Mon Dec 11, 2006 8:58 pm

Re: Database Error: Unable to connect to the database: Could not

Post by Kay » Fri Jul 25, 2008 9:36 am

I am having a similar problem - posted on the installation forum last night : http://forum.joomla.org/viewtopic.php?f=429&t=310575

Been trying since to search for similar problems and found this thread.

I have done what was suggested earlier and run a test.php and I get nothing above the linebreak.

I have checked configuration.php and that matches - the only difference was a space between the last character of my password and the ' (apostrophe) at the end of the line, so just to be sure I took that out but it make no difference.

I have put in a support ticket to my host asking them to restore it to how it was before it went wrong last night, although I don't know how long that will take. But I would like to know what's going wrong in case that doesn't sort it, or if it does it again. I have been looking at php admin but I'm not sure what I should be looking for there.

As I said in my original post, I had done a few things just before it went wrong, I don't know whether they caused the problems.
1) A backup (hopefully this will sort the problem, although it appears I can't restore it myself through cpanel so have asked my host to.
2) Created a second sql database. Having finished the main part of the site and being about to turn it live, my next job was to create a forum. I gave the database a different name, but the same username as the original database, but a different password - I wonder if I should have used a totally different username and that could have caused the problem.
3) Put a redirect on imm2009.com to go to imm2009.com/imm and deleted index.htm at top level (previously an index.htm was diverting traffic to another site).

Then went to check the redirect was working and got the dreaded
Database Error: Unable to connect to the database:Could not connect to MySQL

Any ideas?

Thanks,

Kay

Kay
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Mon Dec 11, 2006 8:58 pm

Re: Database Error: Unable to connect to the database: Could not

Post by Kay » Sat Jul 26, 2008 10:05 am

Problem solved. The original username must have been corrupted somehow. I eventually created a new username and password, assigned it to the database and changed the configuration.php. It is now working, although I still don't know why it went wrong.

dannycron
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Jul 30, 2008 5:54 am

Re: Database Error: Unable to connect to the database: Could not

Post by dannycron » Wed Jul 30, 2008 6:25 am

I started with a "The database adapter is not available" error, which I solved by:
yum install php-mysql

I then got a "Unable to connect to the database:Could not connect to MySQL" error, which I solved by setting the mysql.default_socket parameter in the php.ini file to the same value as the socket parameter (under the [mysqld_safe] section) in the my.cnf (mysql configuration) file. eg: mysql.default_socket = /var/run/mysqld/mysqld.sock

nak
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sat Aug 02, 2008 9:42 am

Re: Database Error: Unable to connect to the database: Could not

Post by nak » Sat Aug 02, 2008 9:50 am

Dear all,

I got the same problem in joomla 1.5. Before, I was using the joomla 1.0x then got the same problem. I fixed that by creating many users with the same password in the database and change the code in configuration.php with the code as the following:

$mosConfig_users = array("tamly1", "tamly2", "tamly3", "tamly4", "tamly5", "tamly6", "tamly7", "tamly8", "tamly9", "tamly10");
$mosConfig_user = $mosConfig_users[array_rand($mosConfig_users)];

Now, using the joomla 1.5 and got the same problem but I don't know how to put more users in the configuration.php since it doesn't use "$mosConfig_user" anymore but using Var $user.

Please could anybody know how to creat many users in configuration.php for advising.

Many thanks

NAK

socal90046
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Sun Jul 27, 2008 5:12 am

Re: Database Error: Unable to connect to the database: Could not

Post by socal90046 » Mon Aug 11, 2008 4:01 am

admodum wrote:. . .
$host = 'localhost';
$user = 'mysqluser';
$pass = 'mypass';
$db = 'databasename';
. . .
As far as I can tell all parameters are ok (database name / user / pass etc. But would the message above mean that there are some permissions that need to be changed by my webhost?
. . .
I would double check the name of the host, user and db--make sure you didn't accidently copy any spaces into the names when you created the file on Notepad (or whatever software you used). It looks like that kind of error to me.

socal90046
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Sun Jul 27, 2008 5:12 am

Re: Database Error: Unable to connect to the database: Could not

Post by socal90046 » Mon Aug 11, 2008 4:19 am

Tizzy wrote:haven't read all the above and don't know if it's been said allready but I spent quite some time searching for an answer, so for what it's worth:
I recently managed to fix this problem by editing the Joomla\configuration.php which had the password hardcoded into it. So changing my pw using only the phpMyAdmin interface closed my website down until I updated the config..php file
I'd suggest that anyone having this problem should use ircmaxell's approach first. It's simple and eliminates potential issues.

If there are no issues below the line, it means that the database exists where you think it should be. It also means that you're using the correct username and password.

After that, I'd doublecheck the configuration.php file to make sure that the entries in that file agree with those in the test file you've just created. If all looks fine there--password, username, etc. is correct--I'd next look into permissions to see if they're set up appropriately.

If you are copying your hostname, password, username, etc. into the program, as I said earlier, make sure that there are no leading or trailing spaces--these will lead to errors on lines 8 and 9.

The final thing--out of an abundance of caution--I'd suggest is that once this test works successfully, I'd delete the test file from the server ASAP.

MindMechanics
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sun Aug 24, 2008 3:02 pm

Re: Database Error: Unable to connect to the database: Could not

Post by MindMechanics » Sun Aug 24, 2008 3:13 pm

Hi there,

I read through the all the posts and can't really identify with anything in there.

I have two installations of Joomla 1.5.4 on the same server. One (www.film-challenge.com) is working fine, the other (beta.film-challenge.com) worked fine this morning and now returns a 'Database Error: Unable to connect to the database:Could not connect to MySQL' error when you try to access it.

I only added a bit of content form the front end this morning and made a few changes to the permissions in Community Builder - surely neither of those action could have made any difference...

Both databases are alive and kicking according to both CPanel and PHPMyAdmin.

Any ideas?

Thanks!

User avatar
ircmaxell
Joomla! Ace
Joomla! Ace
Posts: 1926
Joined: Thu Nov 10, 2005 3:10 am
Location: New Jersey, USA
Contact:

Re: Database Error: Unable to connect to the database: Could not

Post by ircmaxell » Sun Aug 24, 2008 3:27 pm

MindMechanics wrote:Hi there,

I read through the all the posts and can't really identify with anything in there.

I have two installations of Joomla 1.5.4 on the same server. One (http://www.film-challenge.com) is working fine, the other (beta.film-challenge.com) worked fine this morning and now returns a 'Database Error: Unable to connect to the database:Could not connect to MySQL' error when you try to access it.

I only added a bit of content form the front end this morning and made a few changes to the permissions in Community Builder - surely neither of those action could have made any difference...

Both databases are alive and kicking according to both CPanel and PHPMyAdmin.

Any ideas?

Thanks!
Upgrade to 1.5.6 before doing anything else...
Anthony Ferrara - Core Team - Development Coordinator - Bug Squad - JSST

http://moovum.com/ - The Bird is in the air! Get Mollom Anti-Spam on your Joomla! website with Moovur...
http://www.joomlaperformance.com For All Your Joomla Performance Needs

MindMechanics
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sun Aug 24, 2008 3:02 pm

Re: Database Error: Unable to connect to the database: Could not

Post by MindMechanics » Sun Aug 24, 2008 3:59 pm

Will do...

I have a little confession to make though... I used Fantastico to install. I regret it now, but what can I say? I was young, it seemed exciting, all my friends were doing it ;)

Do I have to wait until Fantastico allows me to update or would you recommend updating on top of the Fantastico installation?

Thanks!

MindMechanics
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sun Aug 24, 2008 3:02 pm

Re: Database Error: Unable to connect to the database: Could not

Post by MindMechanics » Sun Aug 24, 2008 4:05 pm

OK, my bad. I was actually working off a different DB than the on I thought I was. When I deleted it the site couldn't connect to it, obviously, but all test showed that connections to the on I thought I was working on showed that it was OK.

Simple. clean. stupid! :-[

socal90046
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Sun Jul 27, 2008 5:12 am

Re: Database Error: Unable to connect to the database: Could not

Post by socal90046 » Mon Aug 25, 2008 12:13 am

MindMechanics wrote:OK, my bad. I was actually working off a different DB than the on I thought I was. When I deleted it the site couldn't connect to it, obviously, but all test showed that connections to the on I thought I was working on showed that it was OK.

Simple. clean. stupid! :-[
I wouldn't call it stupid. The great thing about programming is that it does teach, or should teach, critical thinking. Mistakes happen; that's a given. It's the response to the mistake that, IMHO, makes the difference. If you rationally retrace what you did, eliminating all other possibilities, you'll eventually be drawn to the answer. It makes you a good programmer.

haltonsc
Joomla! Intern
Joomla! Intern
Posts: 77
Joined: Thu Jan 11, 2007 11:13 pm

Re: Database Error: Unable to connect to the database: Could not

Post by haltonsc » Tue Sep 02, 2008 12:54 pm

I had this error when using xp/xampp/ and trying to install joomla1.5.6

Unable to connect to the database:Could not connect to MySQL

This was after reloading my Windows XP localhost and trying to install joomla 1.5.6 into xampp-win32-1.6.7

The error was caused by increased securitry settings which had to be set before installing j1.5.6

To fix it I went into Xampp security settings
http://localhost
chose security settings and clicked the link
http://localhost/security/xamppsecurity.php
This brings up options for the local database and user settings and allows a password to be entered
J1.5.6 can then be installed

cuasar
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Oct 07, 2008 3:15 am

Re: Database Error: Unable to connect to the database: Could not

Post by cuasar » Tue Oct 07, 2008 3:21 am

Hi.
I had the same problem on a pay host, It was because I had installed joomla before and I want a new installation then I had problems with the database, so I deleted the old databases (several times) checking with phpmyadmin ad then everything was ok.

I don't really know what happend but I have the problem solved. I think there was a right problem when I first deleted the old database.

I hope this can be helpfull for someone.

bluffy
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sun Jun 22, 2008 12:33 pm

Re: Database Error: Unable to connect to the database: Could not

Post by bluffy » Wed Oct 22, 2008 1:25 pm

Kay wrote:Problem solved. The original username must have been corrupted somehow. I eventually created a new username and password, assigned it to the database and changed the configuration.php. It is now working, although I still don't know why it went wrong.
i agree wit this suggestion
i too faced the same prob and just added another user and changed it in the config file and site is back working.....
hope it works for others also

docjava
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Wed Dec 19, 2007 6:07 am
Location: Aldergrove, BC

Re: Database Error: Unable to connect to the database: Could not

Post by docjava » Sun Nov 09, 2008 4:00 pm

While installing J1.5 I got the "can't connect to database" error.
I am using Netfirms as a host
The solution both times was to call their tech support. And it was fixed with relative ease.
This time it was pointed out to me that I just needed to change the connection type to "allow external connections"

He also pointed out that it helps if I use the right username and password... whatever.... heh, heh.

Anyway, their support has been better than expected on each occaision. Thanks DK and Nadeem.

Jim Fuller
Aldy.ca

kuria
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Wed Nov 05, 2008 4:18 pm

Re: Database Error: Unable to connect to the database: Could not

Post by kuria » Sun Nov 23, 2008 4:31 pm

hi all,
I keep getting the "Database Error: Unable to connect to the database:Could not connect to database" on the front end, but the administration back end is working perfectly.

please offer me some advice. Thanks

undhmag
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Thu Nov 22, 2007 8:45 am

Re: Database Error: Unable to connect to the database: Could not

Post by undhmag » Wed Nov 26, 2008 5:29 pm

Hi,

I am also struggling and getting: Database Error: Unable to connect to the database:Could not connect to MySQL

History:

-site was hacked >:(
-deleted everything in public_html
-uploaded backup
-uploaded joomla 1.5.0 to 1.5.8 upgrade files
-ran the database check script that someone posted earlier in this topic, all ok. Connects like it should. Here is the script:
<?php
$host = 'localhost';
$user = 'mysqluser';
$pass = 'mypass';
$db = 'databasename';
//Don't change below here
$conn = mysql_connect($host, $user, $pass);
mysql_select_db($db, $conn);
echo '<hr />anything above this linebreak is BAD!';


I have checked and double checked my configuration.php and I cannot seem to spot any problems.

Are there any other files I should be looking at?

Any suggestions are much appreciated. And the site is: http://www.pelletsovner.com

Thanks and regards,
Magne

kuria
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Wed Nov 05, 2008 4:18 pm

Re: Database Error: Unable to connect to the database: Could not

Post by kuria » Thu Nov 27, 2008 5:27 am

undhmag wrote:Hi,

I am also struggling and getting: Database Error: Unable to connect to the database:Could not connect to MySQL

History:

-site was hacked >:(
-deleted everything in public_html
-uploaded backup
-uploaded joomla 1.5.0 to 1.5.8 upgrade files
-ran the database check script that someone posted earlier in this topic, all ok. Connects like it should. Here is the script:
<?php
$host = 'localhost';
$user = 'mysqluser';
$pass = 'mypass';
$db = 'databasename';
//Don't change below here
$conn = mysql_connect($host, $user, $pass);
mysql_select_db($db, $conn);
echo '<hr />anything above this linebreak is BAD!';


I have checked and double checked my configuration.php and I cannot seem to spot any problems.

Are there any other files I should be looking at?

Any suggestions are much appreciated. And the site is: http://www.pelletsovner.com

Thanks and regards,
Magne
hi, my prob is still there but i found out later that it happens when i dont type the "www" in the URL. once i add the "www" in the url it is working nicely. try that.

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 20652
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ Germany/ S'pore/Bogor/ North America
Contact:

Re: Database Error: Unable to connect to the database: Could not

Post by leolam » Thu Nov 27, 2008 5:46 am

undhmag wrote: Any suggestions are much appreciated. And the site is: http://www.pelletsovner.com
Thanks and regards,
Magne
please post your configuration.php and wipe out (xxxxxxx) username and password and email

Leo
Joomla's #1 Professional Services Provider:
#Joomla Professional Support: https://gws-desk.com -
#Joomla Specialized Hosting Solutions: https://gws-host.com -

kuria
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Wed Nov 05, 2008 4:18 pm

Re: Database Error: Unable to connect to the database: Could not

Post by kuria » Thu Nov 27, 2008 5:59 am

leolam wrote:
undhmag wrote: Any suggestions are much appreciated. And the site is: http://www.pelletsovner.com
Thanks and regards,
Magne
please post your configuration.php and wipe out (xxxxxxx) username and password and email

Leo
hi here is the confg.php

<?php
class JConfig {
var $offline = '0';
var $editor = 'tinymce';
var $list_limit = '20';
var $helpurl = 'http://help.joomla.org';
var $debug = '0';
var $debug_lang = '0';
var $sef = '0';
var $sef_rewrite = '0';
var $sef_suffix = '0';
var $feed_limit = '10';
var $secret = 'hhhK49DgA0jerTCw';
var $gzip = '0';
var $error_reporting = '-1';
var $xmlrpc_server = '0';
var $log_path = '/home/xxxxxx/public_html';
var $tmp_path = '/home/xxxxxxxxx/public_html/Joomla/tmp';
var $live_site = 'http://www.xxxxxxxxxx.com';
var $offset = '0';
var $caching = '0';
var $cachetime = '15';
var $cache_handler = 'database';
var $memcache_settings = array();
var $ftp_enable = '0';
var $ftp_host = '127.0.0.1';
var $ftp_port = '21';
var $ftp_user = '';
var $ftp_pass = '';
var $ftp_root = '';
var $dbtype = 'mysql';
var $host = 'localhost';
var $user = 'shuleni_xxxxx';
var $db = 'shuleni_xxxxx';
var $dbprefix = 'jos_';
var $mailer = 'mail';
var $mailfrom = 'xxxxxxxxxxxxxxxxx;
var $fromname = 'Online Students / Teachers resources';
var $sendmail = '/usr/sbin/sendmail';
var $smtpauth = '0';
var $smtpuser = '';
var $smtppass = '';
var $smtphost = 'localhost';
var $MetaAuthor = '1';
var $MetaTitle = '1';
var $lifetime = '30';
var $session_handler = 'database';
var $password = 'xxxxxx';
var $sitename = 'tachers resources';
var $MetaDesc = '';
var $MetaKeys = ',';
var $offline_message = 'This site is down for maintenance. Please check back again soon.';
}
?>

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 20652
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ Germany/ S'pore/Bogor/ North America
Contact:

Re: Database Error: Unable to connect to the database: Could not

Post by leolam » Thu Nov 27, 2008 6:10 am

change:
var $log_path = '/home/xxxxxx/public_html';
var $tmp_path = '/home/xxxxxxxxx/public_html/Joomla/tmp';
var $live_site = 'http://www.xxxxxxxxxx.com';
to:
var $log_path = '/home/xxxxxx/public_html/log';
var $tmp_path = '/home/xxxxxxxxx/public_html/tmp';
var $live_site = '';
and you should be ok

Leo
Joomla's #1 Professional Services Provider:
#Joomla Professional Support: https://gws-desk.com -
#Joomla Specialized Hosting Solutions: https://gws-host.com -

undhmag
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Thu Nov 22, 2007 8:45 am

Re: Database Error: Unable to connect to the database: Could not

Post by undhmag » Thu Nov 27, 2008 6:40 am

leolam wrote:
undhmag wrote: Any suggestions are much appreciated. And the site is: http://www.pelletsovner.com
Thanks and regards,
Magne
please post your configuration.php and wipe out (xxxxxxx) username and password and email

Leo
Her are my configuration.php file:

<?php
class JConfig {
var $offline = '0';
var $editor = 'tinymce';
var $list_limit = '20';
var $helpurl = 'http://help.joomla.org';
var $debug = '0';
var $debug_db = '0';
var $debug_lang = '0';
var $sef = '0';
var $sef_rewrite = '0';
var $feed_limit = '10';
var $feed_summary = '0';
var $secret = 'BdbrGnEb8gxsclE8';
var $gzip = '0';
var $error_reporting = '-1';
var $xmlrpc_server = '1';
var $log_path = '/home/xxxxxxx/public_html/logs';
var $tmp_path = '/home/xxxxxxx/public_html/tmp';
var $offset = '1';
var $caching = '0';
var $cachetime = '15';
var $cache_handler = 'file';
var $memcache_settings = array();
var $ftp_enable = '1';
var $ftp_host = '127.0.0.1';
var $ftp_port = '21';
var $ftp_user = '';
var $ftp_pass = '';
var $ftp_root = '/public_html';
var $dbtype = 'mysql';
var $host = 'localhost';
var $user = 'xxxxxx';
var $db = 'xxxxxxxxxxxxx';
var $dbprefix = 'pel_';
var $mailer = 'mail';
var $mailfrom = 'xxxxxxxxxxxx';
var $fromname = 'www.Pelletsovner.com';
var $sendmail = '/usr/sbin/sendmail';
var $smtpauth = '0';
var $smtpuser = '';
var $smtppass = '';
var $smtphost = 'localhost';
var $MetaAuthor = '1';
var $MetaTitle = '1';
var $lifetime = '15';
var $session_handler = 'database';
var $password = 'xxxxxxxxxxxx';
var $sitename = 'Pellets Guiden';
var $MetaDesc = '';
var $MetaKeys = '';
var $offline_message = 'This site is down for maintenance. Please check back again soon.';
}
?>

Thanks and regards,
Magne

kuria
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Wed Nov 05, 2008 4:18 pm

Re: Database Error: Unable to connect to the database: Could not

Post by kuria » Thu Nov 27, 2008 6:42 am

leolam wrote:change:
var $log_path = '/home/xxxxxx/public_html';
var $tmp_path = '/home/xxxxxxxxx/public_html/Joomla/tmp';
var $live_site = 'http://www.xxxxxxxxxx.com';
to:
var $log_path = '/home/xxxxxx/public_html/log';
var $tmp_path = '/home/xxxxxxxxx/public_html/tmp';
var $live_site = '';
and you should be ok

Leo
Hi Thanks. i have done as u have told me and its not working not unless I add the "www" prefix. Perhaps I should also mention that that the installer is also not working. But my primary concern is the www thing.
any other suggestions?

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 20652
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ Germany/ S'pore/Bogor/ North America
Contact:

Re: Database Error: Unable to connect to the database: Could not

Post by leolam » Thu Nov 27, 2008 6:53 am

@ Kurnia:

no problem to add:
var $live_site = 'http://www.xxxxxxxxxx.com';

does not hurt. If that works you are fine
one more though:

to avoid www/non www add this to your .htaccess at the bottom
########## Begin Redirecting non-www request to www
#
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mysite.com [NC]
RewriteRule (.*) http://www.mysite.com/$1 [L,R=301]
#
########## End
change the mysite.com into your sites name

That takes care of lot of issues as described here for Joomla 1.0.15 you can use here to: http://joomadesk.com/tutorials/46-how-t ... r-problems

For installer not working open a new thread and do not hijack this one for that purpose?

Thanks
Leo
Joomla's #1 Professional Services Provider:
#Joomla Professional Support: https://gws-desk.com -
#Joomla Specialized Hosting Solutions: https://gws-host.com -

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 20652
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ Germany/ S'pore/Bogor/ North America
Contact:

Re: Database Error: Unable to connect to the database: Could not

Post by leolam » Thu Nov 27, 2008 7:02 am

undhmag wrote: Thanks and regards,
Magne
double check these settings:
var $log_path = '/home/xxxxxxx/public_html/logs';
var $tmp_path = '/home/xxxxxxx/public_html/tmp';
var $ftp_enable = '1';
var $ftp_host = '127.0.0.1';
var $ftp_port = '21';
var $ftp_user = '';
var $ftp_pass = '';
var $ftp_root = '/public_html';
var $dbtype = 'mysql';
var $host = 'localhost';
var $user = 'xxxxxx';
var $db = 'xxxxxxxxxxxxx';
var $dbprefix = 'pel_'; (Why you changed that?)

some remarks on the user. Many hosts use the following format for the databse name and database user:
accountusername_dbuser
accountusername_dbuser

If this is al correct go to cpanel, create a new database user and add to the database and change the above variables. If still not ok follow my signature because than we have to look ourselves in the engine room so to speak

Leo
Joomla's #1 Professional Services Provider:
#Joomla Professional Support: https://gws-desk.com -
#Joomla Specialized Hosting Solutions: https://gws-host.com -

undhmag
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Thu Nov 22, 2007 8:45 am

Re: Database Error: Unable to connect to the database: Could not

Post by undhmag » Thu Nov 27, 2008 8:44 am

leolam wrote:
undhmag wrote: Thanks and regards,
Magne
double check these settings:

add to the database
Leo
This fixed my problem :-[ . I had made new user and hadn't assigned to database. Totally newbie :-[

Assigned to database and no more Database Error...... Got some other errormessages, but that will be another story.

Thanks a lot for you help Leo. I really appreciate it.

Thanks and regards,
Magne

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 20652
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ Germany/ S'pore/Bogor/ North America
Contact:

Re: Database Error: Unable to connect to the database: Could not

Post by leolam » Thu Nov 27, 2008 8:55 am

Yummie....another happy face! 8)
Joomla's #1 Professional Services Provider:
#Joomla Professional Support: https://gws-desk.com -
#Joomla Specialized Hosting Solutions: https://gws-host.com -

kuria
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Wed Nov 05, 2008 4:18 pm

Re: Database Error: Unable to connect to the database: Could not

Post by kuria » Thu Nov 27, 2008 12:04 pm

leolam wrote:Yummie....another happy face! 8)
leolam, Thanks, U are the man.


Locked

Return to “Administration 1.5”