Unstable connection to database

My website URL is: http://mmk2search.epizy.com/

What I’m seeing is: Error connectiong to database, connection is unstable

I’m using this software: WordPress

Additional information:

Doens’t happen everytime; the error triggers in every page

  **Warning** : mysqli_real_connect(): (HY000/2002): Connection refused in **/home/vol14_5/epizy.com/epiz_25084651/htdocs/wp-includes/wp-db.php** on line **1633**

**Deprecated** : mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in **/home/vol14_5/epizy.com/epiz_25084651/htdocs/wp-includes/wp-db.php** on line **1665**

**Warning** : mysql_connect(): Connection refused in **/home/vol14_5/epizy.com/epiz_25084651/htdocs/wp-includes/wp-db.php** on line **1665**

`Connection refused`

Thank you in advance

About second warning: I see you’re using mysql_*, Which will be removed in future php versions.

You should change your php version to 5.6.

First and Third errors are Also happening to me sometimes.

I’ll consider updating as soon as i can, thanks for the heads up
but what worries me are the connection refuses…

Check the line number mentioned.

I believe that’s WordPress falling back on the legacy mysql extension because it can’t connect with the newer mysqli extension. It’s a weird design choice from WordPress, but completely normal. And definitely not a reason to downgrade your PHP version.

Do you have any indication as to when this happens? Your website was working fine just now.

1 Like

Then What’d happen if that be removed in next php versions?

The same as what happens now: it will try to connect with mysqli first and if that fails, it will try to connect with mysql. Which will also fail, just because of a different reason.

2 Likes

Right now the problem is showing…sometimes it happens also during the page generation (a styled page with debug text contained in it is returned)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.