user628330
user628330

Reputation: 1

Can't connect to database

Actually I'm having more than one problem...but all of it has to do with connecting or working with the MySQL database...First you can see one of the errors on my website and no matter what you choose it seems to just say it can't connect to the database...I've configured a configure.php file to allow files to connect to the MySQL database...see the website here:

http://netsurfer123.byethost11.com/index.php

Then when I try to log-in to the Admin area of my MySQL database it just says:

phpMyAdmin - Error Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.

Please let me know what I can do to correct these errors...and thanks very much in advanced for any helpful response/s.

Upvotes: 0

Views: 491

Answers (2)

David
David

Reputation: 218798

Did you check the web server log file? Does it contain errors as indicated by phpMyAdmin?

Your site is simply unable to connect to the database to which it's trying to connect. This could be for any number of potential reasons:

  • Is the database running?
  • Is the database accessible by that machine? (Maybe there's a firewall in between the two servers, if they're separated?)
  • If the database is on that same machine, are you connecting to it properly? (Maybe it allows only certain connection methods, such as a socket vs. the loopback address?)
  • Is your connection string correct? Maybe the login is failing?

Check your PHP logs, your Apache logs, your MySQL logs. One of them is complaining about something and it's probably trying to tell you what.

Upvotes: 0

Matt Healy
Matt Healy

Reputation: 18531

First you need to check if the MySQL server is actually running. Use a command such as

/etc/rc.d/init.d/mysqld status

Or similar for your system if possible.

Upvotes: 1

Related Questions