Night1008Night1008
返回文章列表
•约 71 字•预计阅读 1 分钟•Issue #48•

MySQL 业务使用手册

查询数据库大小

SELECT
  table_schema,
  ROUND(SUM(data_length) / 1024 / 1024 / 1024, 2) AS data_size,
  ROUND(SUM(index_length) / 1024 / 1024 / 1024, 2) AS index_size
FROM
  information_schema.TABLES
GROUP BY
  table_schema
ORDER BY
  2 DESC;

导出导入数据库

mysqldump --no-tablespaces -h 127.0.0.1 -P 3306 -u root -p operations_system > operations_system.sql

mysql -h 127.0.0.1 -P 3306 -u root -p operations_system < operations_system.sql
本文由 GitHub Issue #48 同步驱动
在 GitHub 上编辑/讨论

评论互动