Mysql user nor database not created

Discussion in 'Installation/Configuration' started by Esteka IT Solutions, Jul 27, 2017.

  1. Esteka IT Solutions

    Esteka IT Solutions New Member

    Creating new user and databases is not working in ISPConfig 3 under Debian Jessie after the last ISPConfig update:

    I added a new user and database in the administration, waited until the process was executed but I could not connect to the database:

    Code:
    Failed to connect to your database server. The server reports the following message: SQLSTATE[HY000] [1045] Access denied for user 'c1_drupal'@'localhost' (using password: YES).
    In order to debug the server, I deleted both, user and database, then enabled error logs and this is the output I get when creating again the user and database:

    Code:
    Thu Jul 27 10:03:01 CEST 2017 _
    Thu Jul 27 10:03:01 CEST 2017
    Thu Jul 27 10:03:01 CEST 2017 27.07.2017-10:03 - DEBUG - Calling function 'check_phpini_changes' from plugin 'webserver_plugin' raised by action 'server_plugins_loaded'.
    Thu Jul 27 10:03:01 CEST 2017 27.07.2017-10:03 - DEBUG - Found 2 changes, starting update process.
    Thu Jul 27 10:03:01 CEST 2017 27.07.2017-10:03 - DEBUG - Calling function 'db_user_update' from plugin 'mysql_clientdb_plugin' raised by event 'database_user_update'.
    Thu Jul 27 10:03:01 CEST 2017 27.07.2017-10:03 - DEBUG - Processed datalog_id 4466
    Thu Jul 27 10:03:01 CEST 2017 27.07.2017-10:03 - DEBUG - Calling function 'db_insert' from plugin 'mysql_clientdb_plugin' raised by event 'database_insert'.
    Thu Jul 27 10:03:01 CEST 2017 27.07.2017-10:03 - DEBUG - Created MySQL database: c1_drupal
    Thu Jul 27 10:03:01 CEST 2017 27.07.2017-10:03 - DEBUG - Calling GRANT for c1_drupal with access rw and hosts localhost
    Thu Jul 27 10:03:01 CEST 2017 27.07.2017-10:03 - DEBUG - GRANT for user c1_drupal at host localhost
    Thu Jul 27 10:03:01 CEST 2017 27.07.2017-10:03 - DEBUG - GRANT ALL PRIVILEGES ON `c1_drupal`.* TO 'c1_drupal'@'localhost' IDENTIFIED BY PASSWORD '********28B62A90BDD7E95C4A1****' success? no
    Thu Jul 27 10:03:01 CEST 2017 27.07.2017-10:03 - DEBUG - Processed datalog_id 4467
    Thu Jul 27 10:03:01 CEST 2017 27.07.2017-10:03 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    Thu Jul 27 10:03:01 CEST 2017 finished.
    
    The records get created in ispconfig database but nothing changes in mysql database, nor user or database get created there.

    Thanks in advance.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Most likely you changed the MySQL root password but forgot to set the new password in the file /usr/local/ispconfig/server/lib/mysql_clientdb.conf.
     
  3. Esteka IT Solutions

    Esteka IT Solutions New Member

    Nop..., I forgot to mention, I read an issue with the password problem, but this is not the case. The password matches and I can login using that password with user root in phpmyadmin.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    k, so the next possible option is that cron daemon is not running or that the server.sh cronjob in the root crontab is commented out.
     
  5. Esteka IT Solutions

    Esteka IT Solutions New Member

    Cronjobs are not commented out, I followed the instructions here https://www.faqforge.com/linux/debugging-ispconfig-3-server-actions-in-case-of-a-failure/ to enable debugging so I commented both lines in crontab, executed the server.sh script manually and after debugging I reenabled the cron jobs. I have this two lines:

    Code:
    * * * * * /usr/local/ispconfig/server/server.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done
    * * * * * /usr/local/ispconfig/server/cron.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done
    I even rebooted the system, just to check that all services get restarted correctly with no avail.
     
  6. Esteka IT Solutions

    Esteka IT Solutions New Member

    Might this be related to incompatibilities with the latest MariaDb version? I recently upgraded MariaDb manually to the latest in order to use the new JSON functions included.

    Code:
    mysql  Ver 15.1 Distrib 10.2.6-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    That possible. Do you use ISPConfig 3.1.6? If not. update ISPConfig. ISPConfig has been tested and is compatible with the MariaDB versions that ship as default with the Linux distributions.
     
  8. Esteka IT Solutions

    Esteka IT Solutions New Member

    Yes, ISPConfig Version: 3.1.6
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Then your MariaDB version might not be supported. MySQL and MariaDB are changing a lot of things lately that make their database systems incompatible with prior versions, so that software which is made for an older MySQL or MariaDB version might fail.
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Another possibility is that your mysql root user is configured wrong and does not use the mysql native password plugin, I've heard from a user that MariaDB failed for him to create mysql users when this plugin was not enabled.
     
  11. Esteka IT Solutions

    Esteka IT Solutions New Member

    Is there any log or piece of code you can point me to in order to fix the issue?. I have development skills so I think I could make it work with this new MariaDB Version.
     
  12. Esteka IT Solutions

    Esteka IT Solutions New Member

    It has been working for a long time with MariaDB. I would swear it was working after the MariaDb update, but I cannot confirm this as I do not know exactly when it started to happen.
     
    Last edited: Jul 27, 2017
  13. till

    till Super Moderator Staff Member ISPConfig Developer

Share This Page