Strange MySQL behavior

Discussion in 'Server Operation' started by Poliman, Apr 20, 2018.

  1. Poliman

    Poliman Member

    I have 5.7 mysql server installed from Ubuntu 16.04 repos. I executed two queries:
    Code:
    mysql> show databases;
    +--------------------+
    | Database           |
    +--------------------+
    | information_schema |
    | jiradb             |
    | mysql              |
    | performance_schema |
    | phpmyadmin         |
    | svnadmin           |
    | sys                |
    +--------------------+
    7 rows in set (0.00 sec)
    
    and
    Code:
    mysql> SELECT table_schema AS "Database",  ROUND(SUM(data_length + index_length) / 1024 / 1024, 2) AS "Size (MB)"  FROM information_schema.TABLES  GROUP BY table_schema;
    +--------------------+-----------+
    | Database           | Size (MB) |
    +--------------------+-----------+
    | information_schema |      0.16 |
    | mysql              |      2.48 |
    | performance_schema |      0.00 |
    | phpmyadmin         |      0.39 |
    | svnadmin           |      0.78 |
    | sys                |      0.02 |
    +--------------------+-----------+
    6 rows in set (0.03 sec)
    
    As you can see the result of second query there is no "jiradb" database. It's strange. Anybody knows why it does not exist in second result? jiradb is newly created database.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Most likely the database does not contain any tables yet and therefore it has no data in table_schema.
     
    Poliman likes this.
  3. Poliman

    Poliman Member

    Thank you till. I will check it.
     

Share This Page