MySQL debug errors

Discussion in 'General' started by Sharone, Aug 19, 2020.

  1. Sharone

    Sharone Member

    Hi,
    I need help deciphering (and possible fixes) these errors found after running this script. I'm certain there's a discrepancy in the database
    Code:
    root@dns-30:~# /usr/local/ispconfig/server/server.sh
    19.08.2020-13:46 - WARNING - There is already a lockfile set, but no process running with this pid (18484). Continuing.
    PHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv6'@'dns-30.srv.domain.tld' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 85
    PHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv6'@'dns-30.srv.domain.tld' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failedPHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv6'@'dns-30.srv.domain.tld' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failedPHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv6'@'dns-30.srv.domain.tld' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failedPHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv6'@'dns-30.srv.domain.tld' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failedPHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv6'@'dns-30.srv.domain.tld' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failedZugriff auf Datenbankserver fehlgeschlagen! / Database server not accessible!PHP Fatal error:  Uncaught Error: Call to a member function testConnection() on boolean in /usr/local/ispconfig/server/server.php:64
    Stack trace:
    #0 {main}
      thrown in /usr/local/ispconfig/server/server.php on line 64
    PHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv6'@'dns-30.srv.domain.tld' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 85
    PHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv6'@'dns-30.srv.domain.tld' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failedPHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv6'@'dns-30.srv.domain.tld' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failedPHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv6'@'dns-30.srv.domain.tld' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failedPHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv6'@'dns-30.srv.domain.tld' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failedPHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv6'@'dns-30.srv.domain.tld' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failedZugriff auf Datenbankserver fehlgeschlagen! / Database server not accessible!root@dns-30:~#
    
    PHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv6'@'dns-30.srv.domain.tld' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failedPHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv6'@'dns-30.srv.domain.tld' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failedPHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv6'@'dns-30.srv.domain.tld' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failedPHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv6'@'dns-30.srv.domain.tld' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failedPHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv6'@'dns-30.srv.domain.tld' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failedZugriff auf Datenbankserver fehlgeschlagen! / Database server not accessible!PHP Fatal error:  Uncaught Error: Call to a member function testConnection() on boolean in /usr/local/ispconfig/server/server.php:64
    Stack trace:
    #0 {main}
      thrown in /usr/local/ispconfig/server/server.php on line 64
    PHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv6'@'dns-30.srv.domain.tld' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 85
    PHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv6'@'dns-30.srv.domain.tld' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failedPHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv6'@'dns-30.srv.domain.tld' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failedPHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv6'@'dns-30.srv.domain.tld' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failedPHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv6'@'dns-30.srv.domain.tld' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failedPHP Warning:  mysqli_real_connect(): (HY000/1045): Access denied for user 'ispcsrv6'@'dns-30.srv.domain.tld' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failedZugriff auf Datenbankserver fehlgeschlagen! / Database server not accessible!root@dns-30:~#
    
    
     
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    The error tells you that the username and/or password is incorrect. Did you change anything when you were updating your install earlier?
     
  3. Sharone

    Sharone Member

    I haven't changed the password. I have run the update script several times using the same password. Password is the same on the other slave servers and the master server.
    I tried logging in using the same username/password
    and it works but still get these errors
     
    Last edited: Aug 19, 2020
  4. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    This is a failed connection to mysqld via tcp.
    This connects to mysqld via the unix socket.

    The problem is between your hostname, what is in /etc/hosts, and the permissions setup in the mysql user table. Eg. if you allow ispcsrv6@dns-30 in the mysql.user table, but hostname resolution yields dns-30.srv.domain.tld as the connecting hostname, it fails. Verify you have all names (short and fqdn) in /etc/hosts, and see what you allow in or adjust mysql.user.
     
    Th0m likes this.
  5. Sharone

    Sharone Member

    Thank you. I check the other slave servers and this table had 3 extra entries which I have since removed
    /etc/hosts file identical on the master server
    Code:
    127.0.0.1       localhost
    10.0.0.6    db-20.srv.domain.tld     db-20
    10.0.0.5    mail-20.srv.domain.tld   mail-20
    10.0.0.2    dns-20.srv.domain.tld    dns-20
    10.0.0.4    web-20.srv.domain.tld    web-20
    10.0.0.3    dns-30.srv.domain.tld    dns-30
    
    # The following lines are desirable for IPv6 capable hosts
    ::1     localhost ip6-localhost ip6-loopback
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    
    
    I run the update script again and no luck yet.
     

    Attached Files:

  6. till

    till Super Moderator Staff Member ISPConfig Developer

    To test the connection, use this command on the shell of the slave:

    mysql -h master.host.name -u ispcsrv6 -p

    master.host.name is the hostname of the master as stated in config.inc.php dbmaster login details on the slave server.
     
  7. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    You do need entries for your slave servers in the master's user table. You don't need them in all the slaves, though.
     
  8. Sharone

    Sharone Member

    I was able to login using same credentials
    Code:
    root@dns-30:~# mysql -h db-20.srv.domain.tld -u ispcsrv6 -p
    Enter password:
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 236554
    Server version: 5.7.31-0ubuntu0.18.04.1 (Ubuntu)
    
    Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
    
    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.
    
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    mysql>
    
     
  9. Sharone

    Sharone Member

    Thank you. Understood. I did not touch the entries in the master's user table. The entries match the other slave servers save for the hostname. Still having a challenge with this
     
  10. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    If you can login to the master from the slave using mysql cli, then check the 'dbmaster' info in your config.inc.php (or config.inc.local.php), as that's where server.sh should be reading it:
    Code:
    grep dbmaster /usr/local/ispconfig/server/lib/config.inc.{,local.}php
    I think if you run update.php from the ISPConfig installer and reconfigure permissions in the master database it'll write config.inc.php again, or you can just change it directly.
     
  11. Sharone

    Sharone Member

    Code:
    root@dns-30:~# grep dbmaster /usr/local/ispconfig/server/lib/config.inc.php
    $conf['dbmaster_type']                  = 'mysql';
    $conf['dbmaster_host']                  = 'db-20.srv.domain.tld';
    $conf['dbmaster_port']                  = '';
    $conf['dbmaster_database']              = 'dbispconfig';
    $conf['dbmaster_user']                  = 'ispcsrv6';
    $conf['dbmaster_password']              = 'xxxxxxxxxxxxxxxxxx';
    $conf['dbmaster_new_link']              = false;
    $conf['dbmaster_client_flags']  = 0;
    
    Okay while I did manage to log in but I'm not sure this looks right.

    Code:
    mysql -h db-20.srv.domain.tld -u ispcsrv6 -p
    Enter password:
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 330960
    Server version: 5.7.31-0ubuntu0.18.04.1 (Ubuntu)
    
    Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
    
    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.
    
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    mysql> show databases;
    +--------------------+
    | Database           |
    +--------------------+
    | information_schema |
    | dbispconfig        |
    +--------------------+
    2 rows in set (0.00 sec)
    
    mysql> use dbispconfig;
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    
    Database changed
    mysql> show tables;
    +------------------------+
    | Tables_in_dbispconfig  |
    +------------------------+
    | aps_instances          |
    | aps_instances_settings |
    | dns_soa                |
    | ftp_traffic            |
    | mail_backup            |
    | mail_traffic           |
    | monitor_data           |
    | server                 |
    | software_update_inst   |
    | sys_datalog            |
    | sys_group              |
    | sys_log                |
    | sys_remoteaction       |
    | web_backup             |
    | web_domain             |
    | web_traffic            |
    +------------------------+
    16 rows in set (0.01 sec)
    mysql>
    
     
    Last edited by a moderator: Aug 21, 2020
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Not sure if you obfuscated the password, so I replaced it in your post, just to be sure. At first glance, this looks ok to me.
     
  13. Sharone

    Sharone Member

    Yes I altered the password, thanks
     
  14. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    The dbmaster info should point to your master ISPConfig server, is that
    db-20.srv.domain.tld? The list of tables you show is missing a lot; you shouldn't have a functioning interface, or much of anything functioning, with only those tables.
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    @Jesse Norell: not 100% sure, but it might be the ispcsrv server just sees these few tables even if all tables are there as the limits are quite strict. But have never tested what show tables lists for the ispcsrv user.
     

Share This Page