Cannot connect to database

Questions & Problems about Installing or Upgrading with Version 3 phpList.
Forum rules
Please help the volunteers to help you by supplying the version of phpList you are using, browser & version and if possible, a link to your phpList installation.

Cannot connect to database

Postby tommy82 » 5:44am, Tue 14 Apr, 2015

Hi,

I'm trying to install phpList but can't connect to the database. I'm getting in
via phpmyadmin but the installation won't work.

The error message is "Cannot connect to database, Sql server is not running.
Please check your configuration or contact the administrator."

I've talked to my ISP and confirmed that I have the correct connection details,
and that the database server is running.

Any ideas?
tommy82
phpList newbie
 
Posts: 3
Joined: 5:42am, Tue 14 Apr, 2015

Re: Cannot connect to database

Postby Dragonrider » 8:17am, Tue 14 Apr, 2015

I put together a connection test mini script that will confirm if there is an error with your database connection.

The latest version is available on my own website complete with full instructions for it's use.

You may like to give it a try as a second opinion on your connection. This version requires putting in your lists directory on your server, all it does is look at your /config/config.php file for your database settings (so if these are incorrect, it will fail to connect, even the wrong case on one letter will cause a fail) and then tries to connect to your database. It makes NO changes and does not "phone home".

You need to make one amendment to your lists/.htaccess file, shown on the page and I strongly recommend you remove it and the file once you have tested it, hopefully successfully.
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: Cannot connect to database

Postby tommy82 » 4:35pm, Tue 14 Apr, 2015

Thanks! I tried the connection test and got the result "Unable to select database".
What does that mean? I checked the name of the database, and it is correct.
tommy82
phpList newbie
 
Posts: 3
Joined: 5:42am, Tue 14 Apr, 2015

Re: Cannot connect to database

Postby tommy82 » 4:43pm, Tue 14 Apr, 2015

I now realized that the host name seems to be parsed incorrectly.
I have written as this in my config-file: jdmiller.se.mysql

...but it seems to be interpreted like: jdmillersemysql ...without the dots (.)

Any ideas on how to fix this?
tommy82
phpList newbie
 
Posts: 3
Joined: 5:42am, Tue 14 Apr, 2015

Re: Cannot connect to database

Postby Dragonrider » 8:38pm, Tue 14 Apr, 2015

Well, both phpList and my script looks for what you have set in config/config.php and uses those settings to try to access your database. If those details are wrong, then you may need to ask your hosts support about what exactly is the format that you should be using because as it stands, neither phpList or my script can open your database.
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


Return to Installing and Upgrading

Who is online

Users browsing this forum: No registered users and 2 guests

cron