Fatal Error: Cannot connect to database, access denied.

Start here! No need to ask twice :)

Re: Fatal Error: Cannot connect to database, access denied.

Postby guitar978 » 1:45pm, Tue 18 May, 2010

I get the same error plus I am not a good programmer. I'll apply your tips and see what happens!

Thanks!
guitar978
phpList newbie
 
Posts: 0
Joined: 1:39pm, Tue 18 May, 2010

Re: Fatal Error: Cannot connect to database, access denied.

Postby oochigeaskw » 7:14pm, Tue 14 Sep, 2010

Hello! I have the same problem. When I try to go to http://mydomain.com/lists/admin i get the following message:

Fatal Error: Cannot connect to database, access denied. Please contact the administrator

I have checked and changed the config.php looking for error but all seems right to me!

I'm using Xampp on Windows Vista Home Premium, I've upload the folder "list" to "public_files" using FileZilla and configure the "config.php" at follows:

$database_host = "localhost";

$database_name = "xxxxxxxxxxxxxx"; (here I wrote the name of the database I created in phpMyAdmin, database has no tables on it, no typo errors)

$database_user = "root";

$database_password = 'xxxxxxxxxxx'; (here I wrote my password, 13 characters of length)

$installation_name = 'PHPlist';

$table_prefix = "phplist_";

$usertable_prefix = "phplist_user_";

$pageroot = '/lists';

$adminpages = '/lists/admin';

I've checked and there are no typo errors. I'm newbie and don't know what is wrong. Please let me know. Thank you in advance.
oochigeaskw
phpList newbie
 
Posts: 0
Joined: 6:51pm, Tue 14 Sep, 2010

Re: Fatal Error: Cannot connect to database, access denied.

Postby Dragonrider » 7:51pm, Tue 14 Sep, 2010

Hang on a minute, you're confusing me.

Are you running your phpList on your Vista PC using XAAMP or on a website using php/MySQL?

If the former, AFAIK, your password field should be empty.

If the latter, is the database USER correct, as that is often your website username as a prefix, followed by your database username. Again, your database NAME may require your website username as a prefix, is this included?
My sites:- http://wharfedalefestival.co.uk, http://ilkleygardeners.org.uk, http://emergencyaid.net, http://dragonrider.co.uk
Latest phpList version is now 3.0.12 (3 February 2015) and requires a minimum of MySQL 5.0 and PHP 5.3.x
Dragonrider
Moderator
 
Posts: 3460
Joined: 6:58am, Sun 02 Jul, 2006
Location: Ilkley, West Yorkshire, United Kingdom

Re: Fatal Error: Cannot connect to database, access denied.

Postby oochigeaskw » 8:12pm, Fri 17 Sep, 2010

Thanks Dragonrider! But now I'm somewhat confused. Maybe I'm misunderstanding how the whole thing works (remember I'm a noob). I'm assuming that I need a web server (xampp) which will contain all the tables I'll create. With phplist I'll manage the followers that will sign in the subscription form on my webpage. Am I right?

I want to use xampp instead of my web host php/mysql option. But I installed phplist "list" folder on "public_files" folder in my web host file manager. I'm not sure if I need to do this. Let me know.

Btw, I left the password field empty and it doesn't work neither.

Thank you again for your response!
oochigeaskw
phpList newbie
 
Posts: 0
Joined: 6:51pm, Tue 14 Sep, 2010

Re: Fatal Error: Cannot connect to database, access denied.

Postby Dragonrider » 7:20am, Sat 18 Sep, 2010

OK, can you please clarify for me the following.

Have you installed your phpList on your computer, OR on your webspace?

Assuming it is on the webspace, double check your host's settings (your webspace database requirements specifically).

localhost may not be the correct item, it often is, but sometimes hosts have their own rules.

Your username is probably not root, double check that with your host/database page.

Who is your host? There may be the required info on their help pages.
My sites:- http://wharfedalefestival.co.uk, http://ilkleygardeners.org.uk, http://emergencyaid.net, http://dragonrider.co.uk
Latest phpList version is now 3.0.12 (3 February 2015) and requires a minimum of MySQL 5.0 and PHP 5.3.x
Dragonrider
Moderator
 
Posts: 3460
Joined: 6:58am, Sun 02 Jul, 2006
Location: Ilkley, West Yorkshire, United Kingdom

Re: Fatal Error: Cannot connect to database, access denied.

Postby oochigeaskw » 2:34pm, Thu 23 Sep, 2010

Hey! You were right! I installed phplist on my webspace and localhost was not correct to my web host. I created a database in my webspace and then I entered the info into the config.php file and finally it works! But now I want to know if I do need Xampp installed on my pc. Please, let me know if having Xampp is useful. Thanks U ery much!!! ^_^
oochigeaskw
phpList newbie
 
Posts: 0
Joined: 6:51pm, Tue 14 Sep, 2010

Re: Fatal Error: Cannot connect to database, access denied.

Postby Dragonrider » 7:51pm, Thu 23 Sep, 2010

I've found it useful to have something like XAAMP on my PC to run tests on various php programs, phpList, Joomla, forum software etc, as it can be quicker that downloading and editing files from a server, but it's not vital, more convenient.

One thing that you cannot do, as far as I know, is to actually send emails from XAAMP on your PC as it does not come with SMTP mail.
My sites:- http://wharfedalefestival.co.uk, http://ilkleygardeners.org.uk, http://emergencyaid.net, http://dragonrider.co.uk
Latest phpList version is now 3.0.12 (3 February 2015) and requires a minimum of MySQL 5.0 and PHP 5.3.x
Dragonrider
Moderator
 
Posts: 3460
Joined: 6:58am, Sun 02 Jul, 2006
Location: Ilkley, West Yorkshire, United Kingdom

Previous

Return to Frequently Asked Questions

Who is online

Users browsing this forum: No registered users and 1 guest

cron