Calculate mySQL database size in gigabytes

mysql

SELECT table_schema “db_name_here”, sum(data_length + index_length)/1024/1024/1024 “size in GB” FROM information_schema.TABLES GROUP BY table_schema;