Error Establishing database connection in websites

Discussion in 'Installation/Configuration' started by Gordon Fielden, Jan 17, 2025.

  1. Gordon Fielden

    Gordon Fielden Member HowtoForge Supporter

    Hi Guys a liitle help, I have purchased the ispcconfig migrate tools and just completed a server migration everything looked good & ok , but when I go the access the websites I get the following. which suggest something went wrong. What should I do to fix it, i'e is easy or a migration issue
    upload_2025-1-17_22-9-0.png

    Thanks G
     
  2. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    not much info to work with there..

    are the databases on the same server as apache/nginx?
    maybe the database host details need changing in each website.. wp-config.php, db.php etc depending on cms..

    or maybe php is chrooted by default on the new server, and the db host in the websites config is set to 'localhost',
    in which case, you need to turn off the php chroot for each website, or change 'localhost' to '127.0.0.1'

    they're the obvious things, assuming that mysql is actually running.
    if mysql isn't running, there's so many things that could be wrong....
    check/post the logs, or any errors shown from 'systemctl status mysql'
     

Share This Page