子嘉的博客 子嘉的博客
首页
bic-bic
技术
关于
收藏
  • 分类
  • 标签
  • 归档
GitHub (opens new window)

高子嘉

没有比脚更长的路,没有比人更高的山
首页
bic-bic
技术
关于
收藏
  • 分类
  • 标签
  • 归档
GitHub (opens new window)
  • 技术文档

  • GitHub技巧

  • 博客搭建

  • 服务端

  • distributed

  • golang

  • db

    • mysql

      • mysql
      • password
      • dead_lock
      • mariadb password
      • script
      • dump
    • mongodb

    • redis
  • docker

  • linux

  • 技术
  • db
  • mysql
子嘉
2023-11-17

script

# 创建数据库

指定字符集和排序规则

CREATE DATABASE `pilot` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
1

# 统计数据库占用空间

select table_schema                            as '数据库',
       table_name                              as '表名',
       table_rows                              as '记录数',
       truncate(data_length / 1024 / 1024, 2)  as '数据容量(MB)',
       truncate(index_length / 1024 / 1024, 2) as '索引容量(MB)'
from information_schema.TABLES
order by data_length desc, index_length desc;
1
2
3
4
5
6
7
编辑 (opens new window)
上次更新: 2023/11/20, 15:07:15
mariadb password
dump

← mariadb password dump→

最近更新
01
mongodb restore
03-06
02
pytesseract
02-28
03
consul
02-24
更多文章>
Theme by Vdoing | Copyright © 2022-2025 子嘉 | MIT License
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式