Error Establishing a Database Connection in WordPress

I am working on a project with a friend. We are developing a new WordPress website. I am doing the background IT stuff and he is designing the web site.
I want to share my experience of handling the dreaded “Error Establishing a Database Connection” in WordPress. I have not found a similar case while researching this problem, and I want to share the “false” rabbit trails that I went down, trying to solve this problem.

A few nights ago, about 10:00, I received a text message out of the blue from my partner, saying we was busy developing the website, and all of a sudden he went to view it and he got a white screen saying “Error Establishing a Database Connection”. He wanted to know if I was doing something on the web site. I was not. He then informed me that he lost control of the “admin” side of the website as well.

I instantly got a knot in my stomach, as this website has to be up soon, and we have been having difficulties for a while and finally set up a new hosting account.

A little back story:
I used the easy 1 click WordPress install that many hosts have available. Why not? It’s easy!
I adjusted the php version to the latest, set some php parameters that are necessary for the website like the upload size, etc.
Uploaded the purchased theme we are using.
Installed and activated all the necessary plug-ins for the theme.
And set up an additional Admin user.

Perfect. Right?

My partner then went at his magic and started designing the website. As I mentioned before, after several hours of work, and about 10:00 at night, I received a text saying “I am getting an ‘Error Establishing a Database Connection”. Are you doing anything? My response “No, Arrrg!!!” He then said he just lost his admin login also.

The first thing on-line guides will tell you, is to check the database credentials: database name, database user name, password.  I knew these didn’t randomly change.  I tried running a small script to test the database connection and got a 500 internal server error. Ouch.

I logged into the hosting control panel and started fiddling around. I looked at the database, and it all looked ok… for a while. Then I lost connection and the control panel asked me for the password for the database user. Upon searching the web for solutions, the suggestion that the MySql server was down. That seemed likely to me, or at least trying to go down as things were intermittent. Little did I know, I was on a wrong rabbit trail. I fought with that for some time.

I looked into rebuilding the database within WordPress. There is a command that can be added to the end of wp-config.php, and go to a certain url withing your website (Google it), and you should come up with a little menu that enables you to check the database and fix things. I could not access that.

Using the control panel supplied file manager, I manually disabled all the plug-ins. I thought maybe there was a rogue one there somewhere. Ta da… I was able to access the database-fix url. I did that. Then I had admin access. I also had limited access to the actual web site, but some pages were blank. No error, just a white screen. I reactivated the plug-ins and boom, it went down again. I thought I would have to enable one at a time until the nasty one showed its ugly side. I had to do the database rebuild thing each time to gain access. Again, I was on a rabbit trail that I did not intend on being, without knowing it.

In the mean time, my mind was going a hundred different ways. I went to our theme’s web site to see if there was an update beyond the version we had.

There was one a couple of days ago. I looked at the version change log and there was nothing big to that update. BUT… I looked down the change log to previous versions and something caught my eye. An update a while back made the theme compatible with PHP V7.0. Hmmmm, PHP V7.0. When I set everything up, I set the php version to the latest which was….. V7.1! I went into the php configuration and set it from V7.1 down to V7.0. Bada bing bada boom! The site came up. PERFECTLY UP!

The whole time, I had the php version wrong. While my partner was coding away, it must have been hours before he hit a feature that was not compatible with V7.1 and down it went.

As I looked back, I did not come across any website that pointed to this type of problem. So, if you are having an unsolvable problem with your WordPress site losing communications with its database, and all the usual fixes don’t seem to work, maybe… just maybe, you might have the same problem we did. I hope this helps someone!


LaCrosse WS-2315 Wind Interference Solution

I recently put my weather station on a SheevaPlug computer. See my post detailing the process HERE. Since that time, I’ve noticed that the LaCrosse WS-2315 (the weather system I have) has been reporting that wind gusts are 14 MPH very often. I doubted that the wind was really blowing 14 MPH all the time, so I search the Internet for a solution. It seems that the LaCrosse systems are prone to interference on the wind sensor line. A very good article by Kenneth Lavrsen explained a good solution to the problem.  I also, read about using toroidal cores to reduce the interference.  I also have to admit that the line from the wind sensor was loose and flapping in the wind.  That is not a good thing with cold dry staticy weather we have been having.  I tightened up the line, and attached a ferrite noise reducer to the line and the problem went away.  Here is a screen shot of my 14 MPH wind.  Notice the correct readings after about 17:20.  Also, see a blurry picture of the solution.

— John – K7JM

wview Weather On The SheevaPlug

I have, for a long time, wanted a real weather station at my QTH. For Christmas I received a LaCrosse WS-2315 weather system.  It measures temp, wind, wind direction, wind chill, heat index. barometric pressure, humidity, rainfall, and the dew point.

My computers run the Linux operating system.  Specifically, Ubuntu Linux.  I found some nice weather software called “wview” that is compatible with my weather station.  I put wview on my desktop, configured my weather station, and have it upload the weather data to my web site.  You can see it  The whole system worked real nice, but my desktop had to be powered on all the time, and for some reason, when one of my kids would get on it, the weather system would crash.

My solution is the “SheevaPlug” plug computer.  The SheevaPlug is slightly larger than a wall type transformer.  In fact, the SheevaPlug plugs into the wall just like a transformer “wall-wart.”  It also has an option for a power cord, which I find more convenient to use.

Here are some specs from this small box:

  • 1.2 GHz Arm processor
  • 1/2 GB RAM
  • 1/2 GB solid state memory
  • SD/MMC card slot,
  • USB port
  • Gigabit eithernet port
  • USB port to use your computer as a terminal for the SheevaPlug
  • It comes loaded with Ubuntu 9.04 for the Arm Processor

I added an 8GB SD card and upgraded it to Debian Squeeze since Ubuntu does not support the Arm processor anymore.  I then loaded up wview weather software, and my webcam software scripts.  And voila, it works!  It was a fun process and not as clear cut as one would think.  The SheevaPlug is a development kit; and therefore, has no instructions, but there is a lot of information on the Internet.

I made a video (actually three parts) showing an overview of the process that I took to get it all together.  Also, here are some pictures of the setup.

— John – K7JM

embedded by Embedded Video

YouTube Direktwview - SheevaPlug Part 1 embedded by Embedded Video

YouTube Direktwview - SheevaPlug Part 2 embedded by Embedded Video

YouTube Direktwview - SheevaPlug Part 3

Here is a list of web sites shown on my videos:

The Joy Of Ham Radio

Another Ham discovers Linux’s ham friendliness ARRL’s website has another nice story about a Ham using Ubuntu Linux and fldigi to renew his love for Amateur Radio.  Check out the post HERE.  Good going Steve (KØSRE)!  For more of Linux In The Ham Shack, check out “Linux In The Ham Shack” podcast.

– John, K7JM

Ambiance Blue Theme For Ubuntu

My computers run on the Ubuntu Operating System – Not Windows.  If you did not know there was a choice other than Windows and Macs, you need to check out the totally FREE operating system Ubuntu!  Besides the operating system being free, ALMOST ALL of the application programs are free.  There are thousands of them, doing almost anything you need to do on a Windows or Mac machine.  And, if that weren’t enough, most of those thousands of free programs are installable from inside Ubuntu itself.  You don’t have to go searching the Internet for them.  Usually just ONE CLICK, and boom, your program is installed.  Besides all that, there is very little worry about viruses as on Windows, and increasingly on the Mac.  It is really NICE!

Anyway, that is not really what this post is supposed to be about.  This post is about a nice theme that I came across for my Ubuntu desktop.  Ubuntu, besides being FREE with lots of FREE applications, it is very nice looking, and if you want to dig deeper, you can make it REALLY nice looking.

I usually have my Ubuntu Desktop all decked out with some sort of modified Emerald theme, with transparency, and glowing frames and pulsating buttons and such.  As I was searching around one of the many Ubuntu web sites, I came across a proposed theme for the next version of Ubuntu coded named Maverick Meerkat due to be released on 10/10/10.  I am sure this nice theme I found will not be a default theme, as purple and orange seem to be someones liking on the Ubuntu development teams.  I am personally not that thrilled about the purple/orange theme, and usually look for other options.

The theme I came across is a beautiful blue theme called Ambiance Blue.  It is not fancy, or full of glowing parts, or throbbing buttons, but is a very nice looking simple blue theme.  The Ambiance Blue Theme can be downloaded from HERE.  See the picture of my theme below, or click on the small screenshot to see a larger view of one of my desktops.  Yes, in Ubuntu, you have MULTIPLE VIRTUAL DESKTOPS.  Very Nice!

– John

Ubuntu and Ham Radio

The ARRL web site had a nice entry about Ubuntu for Ham Radio.  The article could have been four times as long and not cover all the aspects of why Ubuntu Linux is good for Ham Radio.  Also, several of the applications that the author mentioned in the ARRL article that he used with WINE, have alternates available for Linux, including PCB layout software, and Circuit analysis.  Almost ALL FREE.  Besides, Ubuntu’s super easy to install Ham Radio repository of applications, HERE is a page full of stuff, ranging from the latest and greatest to older Linux Ham Radio programs.  Ham Radio is about innovation, and experimentation.  It is sad to see so much of it is built up on a closed, unexperimentalable, unmodifiable, and costly solution like Windows.

John – K7JM

Linux In The Ham Shack

New Logo, New URL

I am an avid user of the Linux operating system, and of course, a Ham Radio Operator. There happens to be a great podcast that combines these two endeavors into one.  Linux In The Ham Shack.  Recently, they have moved their web page and therefore have a new URL and here it is: Check out Russ’s and Richard’s Linux In The Ham Shack site and their podcast.  If you are a regular listener to the podcast, it might be worth mentioning that they also have a new feed, so if you have been missing episodes lately (like I have), try updating the podcast feed.

I’ve also updated their link on my Links page.  Check that page out for other places I visit often.

Keep up the great work guys!

John – K7JM

It Happened!

I’ve been hacked! My web sites have been hacked.  Fortunately, the hack was so bad that it just broke the web site and I noticed it right away.  It looks as if they came in through my hosting company some how, but I have not received any notice that a server at the hosting company has been compromised.  I deleted the web site and restored it all from a reliable backup.  It was a learning experience; and I am glad that I am fanatical about backups!

John – K7JM

Jaunty Jackalope Revisited

Click to get Jaunty Jackalope

After I installed Ubuntu 9.04 – Jaunty Jackalope, I posted a lengthy list of problems I encountered during and after the process. You can read it by clicking HERE.

I received a great reply from Rob laying out some important facts about updating a major distribution of most any variety.  I encourage you to read Rob‘s reply

It seems, however, that my experience with Jaunty was not unique.  My blog post has been ready by many other users looking for solutions.  Here is a partial list of search entries that resulted in finding and reading my post.

  • solution gdesklets jaunty

  • menu bar missing gnome ubuntu 9.04

  • jaunty jackalope install/upgrade experie

  • install kept back upgrade brasero jaunty

  • desktop effects could not be enabled

  • ubuntu 9.04 partial upgrade brasero

  • error gdesklets ubuntu 904

  • partial upgrade ubuntu 9.04

  • tracker jackalope reindex

  • ubuntu alternate install +grub boot load

  • +nvidia +drivers +jaunty +not +loaded

  • jaunty partial upgrade problem

  • jaunty jackalope partial upgrade

  • ubuntu 9.04 no menu bar

  • ubuntu 9.04 failed to open gdesklets

  • ubuntu 9.04 sansa not connecting

  • missing menu bars jaunty

  • 9.4 jackalope indexing error

  • downloading files from sansamp3 player t

  • ubuntu 9.04 tracker applet missing

  • jaunty jackalope menu bar disappear

  • ubuntu jackalope tracker reindex

  • ubuntu 9.04 missing password

  • ubuntu jaunty not detecting sansa

  • upgrading to jaunty jackalope partial up

  • gdesklets jaunty fix

  • desktop effects could not be enabled

  • ubuntu jaunty sansa

  • tracker indexing error jaunty

  • how to start the compiz gui in ubuntu 9.

  • ubuntu 9.04 recovery menu

  • menu bar missing in ubuntu 9.04

  • applet is not loading ubuntu jaunty jack

  • ubuntu update manager icon disappeared

  • jaunty jackalope recovery menu

  • “open movie editor” ubuntu 9.04 mp3

  • ubuntu 9.04 problem hp laserjet printer

  • ubuntu 9.04 sansa not connecting

  • how to install gdesklets in ubuntu 9.04

  • compiz buggy since upgrade to jaunty

  • kernel failed install when updating to 9

  • partial upgrade jaunty error open office

  • sandisk jaunty

  • nvidia picked up during live not after I

  • missing 9.04 from grub

  • jaunty install software failed

  • ubuntu 9.04 missing compiz menu

  • ubuntu 9.04 tracker “what is”

  • how do i fix a failed ubuntu 9.04 instal

  • sansa clip not working on ubuntu 9.04

  • reindex ubuntu 9.04

  • not work tracker ubuntu 9.04

  • ubuntu 9.04 gdesklets

  • tracker ubuntu 9.04 “re-index”

  • jaunty disable tracker

  • ubuntu 9.04 partial upgrade cannot resta

  • jaunty compiz startup

  • ubuntu 9.04 + update error

  • ubuntu 9.04 nvidia not detected

  • power button missing from ubuntu 9.04

  • sansa not connecting in jaunty

  • kino ubuntu 9.04

  • ubuntu partial upgrade jaunty

  • some of the menus are missing on ubuntu

  • ubuntu 9.04 reindex

  • tracker applet missing ubuntu jaunty

  • ubuntu 9.04 gdesklets

  • ubuntu jaunty auto detect sandisk sansa

  • ubuntu 9.04 vlc media player error

  • xbmc failed to detect distribution jaunt

  • upgrade ubuntu jaunty jackalope gui err

It is obvious that there were too many errors, many of the same ones I encountered, while installing Jaunty.  I (and others) would love to hear about your experience installing Jaunty.  Good or bad.

John – K7JM

Learn CW Online

I love CW (That is: Morse Code).  On the Ham Radio bands, I operate almost exclusively CW.  It is fun and rewarding.  It is a challenge.  It is an easy way to get those DX contacts in the middle of the lowest part of the sun spot cycle.

There seems to be a resergence of interest in CW.  Eliminating CW as a requirement to get a Ham Radio license hasn’t done much to bolster our numbers.  CW is not the reason that our hobby has declining numbers.

Enter .  is a web site I just discovered that will help you learn, or improve your CW skills.  LCWO stands for “Learn CW Online”.   I fiddled around  a bit on the site and found it very interesting; and it will even track your progress.  Give a try, it just might be the ticket to help you learn, or improve your CW.

CW is FUN!

John – K7JM