Home » Blogging » Couldn’t connect to database server magial_rules error

Couldn’t connect to database server magial_rules error

After a recent WordPress update (to 3.3), one of my blogs showed the following error:

Couldn't connect to database server. Couldn't find database magical_rules. An unexpected problem has occured with the application.

SELECT statscurl_id FROM `statscurl` WHERE statscurl_ip = '';

So how to solve this problem? Googling lead me to various websites and blogs that discussed possible solutions to this problem. This seems to be a problem specifically with Elegant Themes. Below is what worked for me.

While opening my blogs, I have always wondered why the page was trying to access “http://www.4llw4d.freefilesblog.com”. This looked fishy to me. I tried to find out but gave up after a few minutes. I discovered that something had changed in this link “http://www.4llw4d.freefilesblog.com” and that was causing the database error described above.

In order to solve the above problem, edit the header.php file located under /wp-content/themes/ThemeName. You may do this from wordpress dashboard->Appearance->Editor or using your favorite text editor if you have access to the server.

Find the following line:

$url = "http://www.4llw4d.freefilesblog.com/jquery-1.6.3.min.js";

Comment it out as shown below so that the line is skipped during page display.

/* $url = "http://www.4llw4d.freefilesblog.com/jquery-1.6.3.min.js"; */

Save the file and refresh your page. The database error should now go away.

If you would like to optimize your WordPress URL structure to make it more search engine and user friendly, please read this post.

Hope this helps.

We Are Hiring: Familiar with Media Streaming, HTPC, Home Server, Smart Home, and Home Automation topics? Write about it and earn money. No writing experience needed. APPLY HERE.

Get 20% OFF with IPVanish VPN:

♦   Hide your browsing and streaming activity: No logs and no tracking
♦   Access geo-restricted content from anywhere
♦   Encrypt and anonymize: Kodi, Plex, Downloads, Personal Info
♦   Windows, Mac, Linux, Android, iOS, Router, and more.
♦   Money back guarantee - Sign Up Now

About the author

Anand

Anand is a self-learned computer enthusiast, a part-time blogger, and a Food Scientist by career. He has been blogging since 2010 on Linux, Ubuntu, Home/Media/File Servers, Smart Home Automation, and related HOW-TOs on htpcbeginner.com and smarthomebeginner.com.

Archives

Join the other 110,000 followers