• Spunto the Rat Boy

    (@spunto-the-rat-boy)


    Hello,

    My personal web site, https://benpaley.com/, is down with “Error reconnecting to database” — I’ve enabled debugging in wp-config.php but it’s still not very informative. I get the same error from /wp-admin

    I can log in to MariaDB perfectly well on the command line using credentials copied from wp-config.php, so there’s nothing wrong there.

    Another site on the same server, https://starcreativeheritage.org/, is working perfectly, which also suppports the notion that it isn’t the server per se that’s the problem.

    Both sites are at WordPress version 6.5.3.
    Both sites connect using localhost .

    As for the server:
    MariaDB says Server version: 10.5.23-MariaDB-0+deb11u1 Debian 11
    PHP version is 8.3

    I tried disabling plugins using wp cli, but I got the same database error.
    I renamed all the plugin folders, but I still got the same error.
    I defined WP_ALLOW_REPAIR as true in wp-config.php and requested wp-admin/maint/repair.php in a browser, but I got the same error.
    I changed DB_HOST to 127.0.0.1 but it didn’t help.
    I was getting “Deprecated” warnings concerning wp-content/object-cache.php so I renamed that and commented out lines relating to WP_CACHE and WPCACHEHOME in wp-config.php, but of course I’m still getting the same error.

    I have made some changes to the site recently — some time last week I spent a bit of time playing with various sorts of caching — but when I stopped playing, the site was working, and I’ve definitely looked at it and seen it working since, so I don’t know whether or not the caching changes I made might be involved.

    I am bewildered. I would really appreciate any ideas on new avenues to explore. I feel like there must be some sort of plugin issue, since the other site is working fine, and what else would the difference be? Then again, renaming all the plugin folders didn’t solve the issue, so maybe it isn’t anything to do with plugins.

    Thanks,
    Ben

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • threadi

    (@threadi)

    The message says that the database server has rejected the connection. This happens if the wrong access data has been entered or there are restrictions on the part of the database server. A local firewall on the server would also be possible.

    I would recommend that you check the following:

    • Check whether there is a db.php in the wp-content directory that may have been created via a plugin with different access data.
    • Check whether the access data in the wp-config.php works at all. If not, check on the database server why not.
    Thread Starter Spunto the Rat Boy

    (@spunto-the-rat-boy)

    Thank you for your reply.

    There is no db.php file in wp-content/ and the connection details from wp-config.php work fine on the command line.

    I’m really grateful to you for thinking about it but I’m afraid it’s a bust.

    threadi

    (@threadi)

    Do you have the possibility to check how the database system handles the login? Sometimes you can also activate logs there for a short time.

    Another idea: simply reset the access data in the database and update it in wp-config.php.

    Thread Starter Spunto the Rat Boy

    (@spunto-the-rat-boy)

    I can view MariaDB error logging with journalctl, I’m not sure where I’d look to find specific login errors. Again, though, I can log in fine on the command line with the same deets so I know they work. But just in case, I created a new MariaDB user with all privileges on the database in question and edited wp-config.php — no luck.

    At this point I’m starting to think that it’s partly a MariaDB bug — it’s definitely a WordPress thing, too, because that’s where the problem shows up, it’s fine on the command line and in the other site so there’s something about this specific context — here’s a snippet from the output of journalctl when I try to load my site:

    mariadbd[168585]: 240512 10:13:56 [ERROR] mysqld got signal 11 ;
    mariadbd[168585]: Sorry, we probably made a mistake, and this is a bug.
    mariadbd[168585]: Your assistance in bug reporting will enable us to fix this for the next release.
    mariadbd[168585]: To report this bug, see https://mariadb.com/kb/en/reporting-bugs

    To my horror, I think that means I have to work out the bug reporting procedure and… you know, I’m not stupid, I’ve got some technical experience, but I’ve read it several times and my mind just slides off it like water off a good tent.

    threadi

    (@threadi)

    In view of this log, a thought: do the login credentials for the database possibly contain special characters? Try writing them as simply as possible, just letters without special characters and numbers. Simply to rule out a character set salad as the cause here.

    And yes, I also think it’s more of a database problem, but it only reaches PHP (not WordPress directly) and is logged there.

    Thread Starter Spunto the Rat Boy

    (@spunto-the-rat-boy)

    Yea, I wondered about that too, the password actually does have some “special” characters, depending on exactly what you mean by special characters… but the problem persisted when I switched everything over to the test user, which had a very plain username and password. And also the other sites, which are working, have similar characters in their passwords. So I think that’s not it.

    I’m very grateful to you for taking the time to think about this — please don’t feel obliged to carry on, but obviously if you have any more ideas I’d be happy to hear them!

    Thanks,
    Ben

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘1 site works, 1 db failure, same server & WP versions’ is closed to new replies.