Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

11
  • 4
    Even after I delete most of the data from the tables in the database, the size remains the same Commented Aug 8, 2014 at 9:05
  • 2
    @Vidz are you using InnoDB engine. If you do, you can free space unless you use file_per_table and alter tables. Commented Nov 1, 2014 at 9:32
  • 6
    Please keep in mind that this method will not return any of the databases that are completely empty, at least a single table must exist for the database to appear in the result. Commented Dec 29, 2014 at 19:39
  • 17
    To select from a single database, add this between the FROM and GROUP line: where table_schema='DATABASE_NAME' - replacing DATABASE_NAME with your database. Commented Nov 9, 2016 at 13:37
  • 4
    Note: MySQL Workbench will spit out a Syntax error: {column title} (double quoted text) is not valid input here. error. The column titles should be wrapped in tick marks. I.e. Database Name. Commented Jul 17, 2017 at 22:15