Blog database server has been down for 24 hours.
Thios page
returns "Error establishing a database connection"
Answer by cmpalmer · Nov 21, 2018 at 03:07 PM
mysql Ver 14.14 Distrib 5.1.73, for redhat-linux-gnu (x86_64) using readline 5.1
Connection id: 716028 Current database: esrb2 Current user: esrblog@login1.ibiblio.org SSL: Not in use Current pager: stdout Using outfile: '' Using delimiter: ; Server version: 5.5.5-10.0.37-MariaDB-wsrep MariaDB Server, wsrep_25.24.rc3fc46e Protocol version: 10 Connection: mysql2.int.ibiblio.org via TCP/IP Server characterset: utf8 Db characterset: latin1 Client characterset: latin1 Conn. characterset: latin1 TCP port: 3306 Uptime: 1 day 1 hour 27 min 0 sec
mysql>
Your database is up, and has been up. I took the liberty of turning on WP_DEBUG, which shows:
Warning: mysqli_real_connect(): (HY000/2000): mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password'). This will store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords flag from your my.cnf file in /public/html/esrblog/wp-includes/wp-db.php on line 1531Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /public/html/esrblog/wp-includes/wp-db.php on line 1562Warning: mysql_connect(): The server requested authentication method unknown to the client [mysql_old_password] in /public/html/esrblog/wp-includes/wp-db.php on line 1562Warning: mysql_connect(): The server requested authentication method unknown to the client in /public/html/esrblog/wp-includes/wp-db.php on line 1562 [snipped]
I'm happy to update your database password to something modern.
I updated your database user's password. Your blog works now. One of our contributors wrote up this guide on asking good tech questions. If you follow it, next time we may be able to fix your problem more quickly: smart questions - before you ask
My site also has not been able to connect to the database for a couple of days via the hosted PHP, e.g.:
https://library.timelesstruths.org/search/?query=music&q=song
(But I can still connect from my own computer through the client HeidiSQL).
Hi @timeless, for your site, you seem to be using the deprecated mysql_ functions as described here. That page gives you info on alternatives, and note that December is a hard deadline where the old deprecated mysql_ functions stop being supported everywhere. We can't go back to support them. Specifically, and as a starting point, I see this in your
~db.php
file:
$db_link = mysql_connect(...
That and other mysql_* calls must be changed.
Answer by timeless · Nov 24, 2018 at 05:51 PM
Thanks a bunch, @cmpalmer, I should have first tried the password reset solution you gave above, as that resolved the immediate problem, but thanks for the forewarning about the upcoming end-of-life for mysql_ functions. Is PHP being updated to version 7.1 or 7.2?