随笔分类 - 数据库技术
摘要:环境描述: OS:openEuler 22.03 LTS-SP3 mongoDB:7.0.6 mongodb-database-tools:100.9.0 mongosh:2.1.5 GCC:12.3.1 Python:3.9.9 Clang:12.0.1 服务器规划: 主机名 IP地址 Mongo
阅读全文
摘要:1、MySQL自动备份脚本 # vi /opt/scritps/db_backup.sh #!/bin/bash USER=root PASSWORD=123456 DATABASE1=test-db1 #DATABASE2=test-db2 BACKUP_DIR="/opt/data_bankup
阅读全文
摘要:注:database为要查看的数据库名称 1、查看索引 (1)单位是GB SELECT CONCAT(ROUND(SUM(index_length)/(1024*1024*1024), 6), ' GB') AS 'Total Index Size' FROM information_schema.
阅读全文
摘要:环境说明(见最下方注解可不锁表): Oracle Linux 7.5 MariaDB 10.2.14 Master DB:192.168.168.10 Slave-1 DB(relay) DB:192.168.168.11和172.16.216.11 Slave-2 DB:172.16.216.12
阅读全文