API database add are shown but don't exists

Discussion in 'General' started by desire.levi, Mar 18, 2016.

  1. desire.levi

    desire.levi New Member

    Hello,

    I'm using the ispconfig3 api to allow my client to interact with ispconfig3 from another apps.
    When i call the function sites_database_add(), then checking in ispconfig, the database exists.
    But if i connect with the database user or root in mysql or phpmyadmin , i dont'see the the database.
    So i run some tests :
    - i create a database in the interface and called the api to see its parameters,
    - i create a database with the api providing the same parameters than the previous but database name.
    The both are shown in ispconfig3, the later don't exists in mysql.

    Is there something i miss ?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Compare the two records in the ispconfig database to see if they differ.
     
  3. desire.levi

    desire.levi New Member

    Done,
    below, the record of a DB created with the interface
    array (size=1)
    0 =>
    array (size=21)
    'database_id' => string '587' (length=3)
    'sys_userid' => string '891' (length=3)
    'sys_groupid' => string '891' (length=3)
    'sys_perm_user' => string 'riud' (length=4)
    'sys_perm_group' => string 'riud' (length=4)
    'sys_perm_other' => string '' (length=0)
    'server_id' => string '3' (length=1)
    'parent_domain_id' => string '1072' (length=4)
    'type' => string 'mysql' (length=5)
    'database_name' => string 'c890_fabtest' (length=12)
    'database_name_prefix' => string 'c890_' (length=5)
    'database_quota' => null
    'last_quota_notification' => null
    'database_user_id' => string '495' (length=3)
    'database_ro_user_id' => string '0' (length=1)
    'database_charset' => string 'utf8' (length=4)
    'remote_access' => string 'y' (length=1)
    'remote_ips' => string '' (length=0)
    'backup_interval' => string 'none' (length=4)
    'backup_copies' => string '1' (length=1)
    'active' => string 'y' (length=1)

    And now, the DB created with the API

    array (size=1)
    0 =>
    array (size=21)
    'database_id' => string '593' (length=3)
    'sys_userid' => string '891' (length=3)
    'sys_groupid' => string '891' (length=3)
    'sys_perm_user' => string 'riud' (length=4)
    'sys_perm_group' => string 'riud' (length=4)
    'sys_perm_other' => string '' (length=0)
    'server_id' => string '3' (length=1)
    'parent_domain_id' => string '1072' (length=4)
    'type' => string 'mysql' (length=5)
    'database_name' => string 'c890_database' (length=13)
    'database_name_prefix' => string 'c890_' (length=5)
    'database_quota' => null
    'last_quota_notification' => null
    'database_user_id' => string '502' (length=3)
    'database_ro_user_id' => string '0' (length=1)
    'database_charset' => string 'utf-8' (length=5)
    'remote_access' => string 'y' (length=1)
    'remote_ips' => string '' (length=0)
    'backup_interval' => string 'monthly' (length=7)
    'backup_copies' => string '1' (length=1)
    'active' => string 'y' (length=1)

    For the API , i gave the dabase_name_prefix based on the previous record.
    But with or without the prefix, it isn't created.
     
  4. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Perhaps this matters:
    vs.
     
  5. desire.levi

    desire.levi New Member

    OMG, you're totally right, i missed it in my countless comparaisons of the two records.
    Thanks for the tips.
    Everything OK now, thanks.
    The databases are created and appear both on the graphic interface and on the mysql server.
     

Share This Page