ISPconfig 3: can't add new database

Discussion in 'General' started by crazylamp, Jan 10, 2012.

  1. crazylamp

    crazylamp New Member

    When I add a new database(c1test, etc), there was no error occur in the UI, and it seems create database succesfully.. but acctualy there is no 'c1test' exist in the mysql database..
    and the apache log as bellow:

    Code:
    [Tue Jan 10 11:36:13 2012] [error] [client 113.96.206.237] PHP Notice:  Undefined index: remote_access in /usr/local/ispconfig/interface/lib/classes/validate_database.inc.php on line 39, referer: https://www.xxx.com:82/index.php
    [Tue Jan 10 11:36:13 2012] [error] [client 113.96.206.237] PHP Notice:  Undefined index: on_after_insert in /usr/local/ispconfig/interface/lib/classes/plugin.inc.php on line 139, referer: https://www.xxx.com:82/index.php
    [Tue Jan 10 11:36:13 2012] [error] [client 113.96.206.237] PHP Notice:  Undefined index: sites:on_after_insert in /usr/local/ispconfig/interface/lib/classes/plugin.inc.php on line 139, referer: https://www.xxx.com:82/index.php
    [Tue Jan 10 11:36:13 2012] [error] [client 113.96.206.237] PHP Notice:  Undefined index: sites:database:on_after_insert in /usr/local/ispconfig/interface/lib/classes/plugin.inc.php on line 139, referer: https://www.xxx.com:82/index.php
    [Tue Jan 10 11:36:13 2012] [error] [client 113.96.206.237] PHP Notice:  Undefined index: return_to_url in /usr/local/ispconfig/interface/lib/classes/tform_actions.inc.php on line 218, referer: https://www.xxx.com:82/index.php
    
    I can create database before..

    Does anybody knows what happening?...

    Thanks for any of your help..
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Just a guess: Have you changed the mysql root passwort without changing it in /usr/local/ispconfig/server/lib/mysql_clientdb.conf? If thats the case, then ispconfig can not create new databases anymore until you change the password in that file too.
     
  3. crazylamp

    crazylamp New Member

    no, i did not change the mysql root password..
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

  5. crazylamp

    crazylamp New Member

    It works now. Thank you till.

    I enabled debugging in ispconfig and i found the monitor_data table was broken.. I just repaird it and everything is ok now..
    But i have no idear of how the monitor_data table broken.

    Thank you so much, till.
    :)
     
  6. ArchEnemy

    ArchEnemy New Member

    No clues on debug mode

    Hello,

    I have the same problem with ispconfig 3.0.4.2.Can't create database. If I'm looking at dbispconfig database at web_database table I can see the newly added data base.

    I can log on with root and password on the mysql server with the mysql client.


    And the debug give me no clues.

    ispcongih log :

    2012-01-18 17:57 xx.xxxxxx.xx Debug There is already an instance of server.php running. Exiting.
    2012-01-18 17:56 xx.xxxxxx.xx Debug There is already an instance of server.php running. Exiting.
    2012-01-18 17:55 xx.xxxxxx.xx Debug There is already an instance of server.php running. Exiting.
    2012-01-18 17:54 xx.xxxxxx.xx Debug There is already an instance of server.php running. Exiting.
    2012-01-18 17:53 xx.xxxxxx.xx Debug There is already an instance of server.php running. Exiting.
    2012-01-18 17:52 xx.xxxxxx.xx Debug There is already an instance of server.php running. Exiting.
    2012-01-18 17:51 xx.xxxxxx.xx Debug There is already an instance of server.php running. Exiting.
    2012-01-18 17:50 xx.xxxxxx.xx Debug There is already an instance of server.php running. Exiting.
    2012-01-18 17:49 xx.xxxxxx.xx Debug There is already an instance of server.php running. Exiting.
    2012-01-18 17:48 xx.xxxxxx.xx Debug There is already an instance of server.php running. Exiting.
    2012-01-18 17:47 xx.xxxxxx.xx Debug There is already an instance of server.php running. Exiting.

    Any help would be appreciate.

    ArchEnemy
     
  7. CiTuX

    CiTuX New Member

    I have the same problem...
    The password in the file /usr/local/ispconfig/server/lib/mysql_clientdb.conf is correct.
     
  8. falko

    falko Super Moderator ISPConfig Developer

    What's the output of
    Code:
    ls -la /usr/local/ispconfig/server/
    ?
     
  9. nicademus

    nicademus New Member

    I think I may have a similar problem - All was well, I realised I hadn't enabled Jailkit, so set it up, then did an ispconfig_update to enable it...Still major problems with it, so scrapped that idea and now using internal-sftp for the sftp uploads for clients (which is all we needed anyway...)

    However since doing that, if I try and setup a new database it has an error up the top of the page when you click "Add New Database"

    DB::query(SELECT client_id FROM sys_group WHERE groupid = ) -> mysqli_query You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1DB::query(SELECT client_id FROM sys_group WHERE groupid = ) -> mysqli_query You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

    However you can continue to create the database...What happens then is the Database is created but the "User" is not created on the MYSQL server, and subsequently that user is then not given access to the database itself. I quickly add these details in the background using webmin and tested the database, it was OK.

    But seeing these posts, I'm wondering if there might be a problem with one or two of the dbispconfig database tables that is causing this problem....and if so How do I fix it? maybe an mysqld consistancy check against that database...? re-index...? or is there an ispconfig_db_repair.php program somewhere...?

    Thanks muchly in advance :)

    Also looking at the web_database table in dbispconfig it actually contains the username and password...it just didn't seem to translate to the MYSQL user and database permissions...and /var/logs/httpd/error_log is showing nothing...
     
    Last edited: Jan 30, 2012
  10. nicademus

    nicademus New Member

    To quote Bones..."It's worse than that it's Dead Jim..." it seems to have extended further thatn just Database creation. I created a new client, then moments later went to try and create a web-site against that user but their name did not appear in the client list. I went into the backend mysqld database in the sys_group table and found that although the "groupid" existed the "name" was missing...something is fishy in Gotham Falk-man...
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you create the new client in ISPConfig or with the remote API?
     
  12. nicademus

    nicademus New Member

    Everything through the ISPConfig panel, - nothing remote. As I mentioned I think this has all come about after I forced the update to try and enable jailkit. I think I might have even tried the ispconfig_update it didn't run because it couldn't find an update, so I think I did the updatefromsvn...it ran, and maybe that is what has broken it, but then when I try ti run ispconfig_update it finds no update so doesn't run.

    What I would like to do to discount this as an issue would be to make sure I have a full backup and force the standard install/update, and if need be re-import the backup DB...maybe that will fix things.
    Or can someone suggest the something like setting up a debug so I can trace why these things are happening..
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    That was a bed choice, the svn code is untested development code, it might not work at all. SVN is only used for development systems that dont run any real sites and clients.

    The manual update procedure is described in the release notes of every release, e.g.:

    http://www.howtoforge.com/forums/showthread.php?t=55706
     
  14. nicademus

    nicademus New Member

    All fixed for Me

    Brilliant...I definately know where I went wrong - It was due to as I mentioned, not initially jailkit'ing but I found many posts saying to do ispconfig_update.sh to reconfigure services (after I updated jailkit) however when I ran that it wouldn't update as there was no update to that version. running SVN worked so I left it, until I found this problem.

    NOOOWWWW I decided to skip one automated step slightly and run update_from_tgz.sh which I realised is the script that the ispconfig_update.sh runs once it confirms a version number update is available...so ran this, it reconfigured master database, and services, and I dare say overwrite all php files, etc. Now when I create a new database it creates all the user permissions on it as well..Subsequently when creating a new Client I can immediately go to the website tab and create a website and the user appears, instead of being a blank line (due to "name" field being blank in sys_group table)

    THANK YOU heaps for time - not sure if a manual update will help original OP - but I would suggest giving it a go, and choose to "Reconfigure Master database permissions..." These may be totally different issues, but I don't see any harm in running the update manually just to make sure...of course I defer to the ISPConfig expert opinion on this...
     

Share This Page