Title: Error connecting to database
Last modified: August 11, 2017

---

# Error connecting to database

 *  [keystonearchitecture](https://wordpress.org/support/users/keystonearchitecture/)
 * (@keystonearchitecture)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/error-connecting-to-database-9/)
 * Guys,
 * Have tried several options to figure out the reason I am getting the error above.
   I think it is a password issue though not 100% certain and don’t know how to 
   check my password via phpmyadmin or mySQL using Mac OSX sierra (firefox). I have
   enabled full error messaging so that it can be seen what the error is. I am at
   a loss how to fix. I have contacted webhost several times over the last week 
   no response, so any help is much appreciated. Happened randomly about a week 
   ago.
 * Thanks
 * Chris
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-connecting-to-database-9%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Moderator [tobifjellner (Tor-Bjorn “Tobi” Fjellner)](https://wordpress.org/support/users/tobifjellner/)
 * (@tobifjellner)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/error-connecting-to-database-9/#post-9401381)
 * First of all:
    Have debugging turned on only while you’re using it, since it 
   sometimes may leak a bit too much information.
 * Besides that, the connection and login details to your SQL is something you need
   to check with your hosting provider. Many hosting companies make these settings
   available via self-service panel.
 *  Thread Starter [keystonearchitecture](https://wordpress.org/support/users/keystonearchitecture/)
 * (@keystonearchitecture)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/error-connecting-to-database-9/#post-9401443)
 * I turned on debug so that you could see the error.
 * My host does not allow these to be self service. Any way I can look into it without
   their help (not responsive)?
 *  Thread Starter [keystonearchitecture](https://wordpress.org/support/users/keystonearchitecture/)
 * (@keystonearchitecture)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/error-connecting-to-database-9/#post-9401450)
 * I get this error on front and backside of the website, forgot to mention.
    Thanks
   for taking a look!!
 *  Moderator [tobifjellner (Tor-Bjorn “Tobi” Fjellner)](https://wordpress.org/support/users/tobifjellner/)
 * (@tobifjellner)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/error-connecting-to-database-9/#post-9401507)
 * Actually, you get this error even before WordPress manages to start working.
 * The only thing you can do is to double-check how the connection to the database
   should be set up.
 * If you have a previously backed up copy of your files, then you could try to 
   compare the connection details for the database with what you’ve got now.
 * Is the database really located on same server as the web server, for instance?(
   the error mentioned [@localhost](https://wordpress.org/support/users/localhost/)).
 *  Thread Starter [keystonearchitecture](https://wordpress.org/support/users/keystonearchitecture/)
 * (@keystonearchitecture)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/error-connecting-to-database-9/#post-9401539)
 * yes, it is. The webhost has several mac servers with each user having access 
   to a folder on the server hard drive with the website generated from that folder,
   therefore localhost.
 * I will look at backups. I am concerned that the password was changed without 
   my knowledge – so the wp-config and the SQL passwords may be different. Wp-config
   has the same SQL password that I was originally issued for database access and
   AFAIK it hasn’t changed. But I have altered my admin user password over the years,
   and when I plug the current one (or the one I think is current) in, I get the
   white screen instead of the connection error.
 * That’s why I was thinking that I needed to confirm my SQL password was the same
   as shown in config. Without a response from the host to confirm I thought maybe
   there was another way to check passwords.
 * Does it seem to you that it’s a password issue, too?
 *  Moderator [tobifjellner (Tor-Bjorn “Tobi” Fjellner)](https://wordpress.org/support/users/tobifjellner/)
 * (@tobifjellner)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/error-connecting-to-database-9/#post-9401575)
 * The detailed error message indicates that WordPress starts talking to the database,
   but login details were rejected. So, yes. Wrong user-id or wrong password. (Or
   talking to wrong server!)
 *  Thread Starter [keystonearchitecture](https://wordpress.org/support/users/keystonearchitecture/)
 * (@keystonearchitecture)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/error-connecting-to-database-9/#post-9401721)
 * OK, so is there any way that I can confirm my login data without involving the
   webhost?
 *  Moderator [tobifjellner (Tor-Bjorn “Tobi” Fjellner)](https://wordpress.org/support/users/tobifjellner/)
 * (@tobifjellner)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/error-connecting-to-database-9/#post-9401774)
 * That would be only brute force, but I’d definitely not recommend it…
 * (Umm. Or perhaps migrating to another hosting company…)
 * But wait: Did you say that you’re able to login to phpmyadmin? Perhaps you then
   could simply create a new database user, or set the password for the user WP 
   calls?
 *  Thread Starter [keystonearchitecture](https://wordpress.org/support/users/keystonearchitecture/)
 * (@keystonearchitecture)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/error-connecting-to-database-9/#post-9401828)
 * I don’t know how to login via phpmyadmin. That was my thought as workaround. 
   Downloaded it to my mac but don’t know how to get it running.
 * Migrating sounds nice but I think I need info from my webhost which is hard to
   get without responses. They are my domain manager too.
 *  Moderator [tobifjellner (Tor-Bjorn “Tobi” Fjellner)](https://wordpress.org/support/users/tobifjellner/)
 * (@tobifjellner)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/error-connecting-to-database-9/#post-9401918)
 * Yeah, that would be a longer term solution.
 * phpmyadmin is a web interface to mysql (and homologues). So it would typically
   be installed on the same server where mysql is running.
 * In order to phpmyadmin to talk to the database, you need to be able to connect
   to the database server (which usually is located behind a firewall) and have 
   valid login details. Many hosting companies give you a button where you’re automatically
   logged in to the database. Doesn’t seem to be the case here, though.
    -  This reply was modified 8 years, 10 months ago by [tobifjellner (Tor-Bjorn “Tobi” Fjellner)](https://wordpress.org/support/users/tobifjellner/).
 *  Thread Starter [keystonearchitecture](https://wordpress.org/support/users/keystonearchitecture/)
 * (@keystonearchitecture)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/error-connecting-to-database-9/#post-9401931)
 * I am guessing that my login info is incorrect so phpmyadmin won’t work (won’t
   be able to login to the db).
 * Any other possible solutions?
 *  Moderator [tobifjellner (Tor-Bjorn “Tobi” Fjellner)](https://wordpress.org/support/users/tobifjellner/)
 * (@tobifjellner)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/error-connecting-to-database-9/#post-9402021)
 * No. For any other solution, you need the hosting company to do their part.
 *  Thread Starter [keystonearchitecture](https://wordpress.org/support/users/keystonearchitecture/)
 * (@keystonearchitecture)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/error-connecting-to-database-9/#post-9402055)
 * OK Tor. Really appreciate your help today. Confirmed that I was on the right 
   track. Have a great weekend!!
 * Chris

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Error connecting to database’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 13 replies
 * 2 participants
 * Last reply from: [keystonearchitecture](https://wordpress.org/support/users/keystonearchitecture/)
 * Last activity: [8 years, 10 months ago](https://wordpress.org/support/topic/error-connecting-to-database-9/#post-9402055)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
