Sites Not Able to Connect To Database

Discussion in 'General' started by Gregory S Tibbetts, Aug 2, 2018.

  1. I just migrated some web sites from a Plesk 11.5 server to an ISP Config 3.1 server. It is apparent that my sites are not able to connect to the database.
    If they are wordpress sites I get the following error.

    Error establishing a database connection

    I get the same problem with Joomla and roundcube. Can anyone help?
    It seems all sites except the ispconfig control panel can't connect to the database.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Check if the MySQL users that your sites are using to connect exist in mysql, you can use phpmyadmin for that. And check if the databases exist in mysql with phpmyadmin. Then check the config files of your websites that they use the right hostname to connect to mysql, on a single server setup, this hostname is 'localhost'.
  3. I don't see a way to get into phpmyadmin through the ispconfig control panel. Do you know how. Didn't see anything in Google either.
  4. Could this be a misconfiguration while installing mysql?
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    PHPMyAdmin is not related to ISPConfig, it's an independent program.

    On Apache servers, you reach it normally with:


    and for nginx servers, use:

  6. Is there a way to check qand see if the mysql server is configured to connect to localhost or possibly the servers hostname? When I look at the databases in ispconfig it says the database host name is my servers hostname. I just wanted to make sure they are configured to connect to localhost. If not I can grant all users access to the servers hostname, localhost and Anyone know how?
  7. I have another issue too. I pointed the DNS for one of the sites at this server so I can resolve the db connection issue. I tried to connect with the ftp user from that site and I can't connect to ftp. I even changed the ftp password and I still can't connect. I even tried to connect to ssh with the user and can't connect. I have a question. In the isp config admin what is shell user for?
  8. I even tried creating an ftp user and can't connect. I tried both types of usernames.

    [email protected]
  9. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    ISPConfig stores user settings in the database. If database connection fails, ftp login can not work.
  10. Ghostdare

    Ghostdare Member

    @Gregory S Tibbetts - we do not know your setup and if you are behind a router/firewall and port are opened for FTP connection.

    When you migrate a site from server to server you copy web files and dump the database. Afterward, you copy on the new server the web files and import the database. On the old server the name of the database had a name and on the new server could be different (maybe identical) but also a different password.
  11. I have to reset passwords for sites in mysql. So I figured out the issue. I had to run multiple versions of php because I needed at least php 5.6. I also reset the password for the database user using the root user.
  12. is running on the new ISPConfig Server.
    till likes this.
  13. I figured out that some of the passwords need reset and some of the users are not in mysql. I did run into a problem with ispconfig. When I add a database user in ISPConfig the user is not added in php MyAdmin.
  14. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Database user added in ISPConfig can log in with PHPMyAdmin. Is this not happening in your setup?
  15. I tried adding a database user in ISPConfig and it was not added in phpMyAdmin. I had to add the users in mysql.
  16. Taleman

    Taleman Well-Known Member HowtoForge Supporter

  17. It does show a circle. I will look into it.
  18. I manually ran from the command line and got the following error. How do I fix the issue on cent os 7.5.
    [[email protected] sites-enabled]# /usr/local/ispconfig/server/
    PHP Warning: Module 'mcrypt' already loaded in Unknown on line 0

    06.08.2018-12:19 - DEBUG - Calling function 'check_phpini_changes' from plugin 'webserver_plugin' raised by action 'server_plugins_loaded'.
    06.08.2018-12:19 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    PHP Warning: Module 'mcrypt' already loaded in Unknown on line 0
  19. The other thing that may have something to do with this is that my default version of php is 5.4. I have installed multiple versions of php including 5.6, 7.1 and 7.2.
  20. I get some of the following errors when I run the ISPConfig test script.
    [WARN] could not determine server's ip address by ifconfig
    [WARN] Port 465 (SMTP server SSL) seems NOT to be listening
    [WARN] Port 21 (FTP server) seems NOT to be listening
    [WARN] I found no "submission" entry in your postfix
    [WARN] I found no "smtps" entry in your postfix
    [WARN] I could not determine which ftp server is running.

Share This Page