查看 MySQL 或 MariaDB数据库大小

SELECT table_schema AS "Database Name",
  ROUND(SUM(data_length + index_length) / 1024 / 1024, 2)
  AS "Size in (MB)"
  FROM information_schema.TABLES
  GROUP BY table_schema;

查看全部

SELECT table_schema AS "Database Name",
  ROUND(SUM(data_length + index_length) / 1024 / 1024, 2)
  AS "Size in (MB)"
  FROM information_schema.TABLES
  WHERE table_schema = "YOUR_DB_NAME";

查看一个

SELECT table_name AS "Table Name",
  ROUND(((data_length + index_length) / 1024 / 1024), 2)
  AS "Size in (MB)"
  FROM information_schema.TABLES
  WHERE table_schema = "YOUR_DB_NAME"
  ORDER BY (data_length + index_length) DESC;

查询表

MSSQL 自动同步(转移)MYSQL

由于项目历史原因,需要同步MSSQL数据库到MYSQL数据库中。

工具:Navicat

首先 添加 MSSQL 和 MYSQL 到 Navicat中

然后在工具中 找到数据传输。

最后就是在高级选项中,记得勾上或者勾去 插入数据。

最简单的方便。

直接在Navicat里面 拖动 table就好了。