title: MySQL Query database size
body: <p>Is there a query or function that I can use to determine the size of a database in MySQL? If not what is the typical way to find the size of database in MySQL?</p>
  
  <p>I was googling and found <code>SELECT CONCAT(sum(ROUND(((DATA_LENGTH + INDEX_LENGTH - DATA_FREE) / 1024 / 1024),2))," MB") AS Size FROM INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA like '%YOUR_DB_NAME%' ;</code></p>
  
  <p>And it returns a database that I know is 400MB to be <code>474989023196466.25 MB</code>!</p>