Author Topic: MySQL  (Read 6790 times)

0 Members and 1 Guest are viewing this topic.

adarqui

  • Administrator
  • Hero Member
  • *****
  • Posts: 33619
  • who run it.
  • Respect: +8700
    • View Profile
    • Email
MySQL
« on: June 26, 2014, 09:47:04 pm »
0
Random mysql notes.

List DB by size:
Code: [Select]
SELECT table_schema "Data Base Name", sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB"
FROM information_schema.TABLES GROUP BY table_schema ;
(reference: http://forums.mysql.com/read.php?108,201578,201578)


Optimizing tables via mysqlcheck:
-o will optimize the table. If the table doesn't support optimization , it will be recreated.
Code: [Select]
mysqlcheck -o database -u user -p