Tuesday, December 2, 2025

.::: Drop All tables in database using Truncate & drop :::.


correlation with https://teguhth.blogspot.com/2025/10/script-drop-all-database-non-system-in.html

1. Drop table using script
 
 

2. Drop table using script and duration
 


3. script drop_table_indb.sh


[root@teguhth tbldrop]# pwd
/data/drop/tbldrop
[root@teguhth tbldrop]# cat drop_table_indb.sh
#!/bin/bash
# ===========================================================
# Script Name  : drop_all_tbl_confirm.sh
# Tujuan       : Menghapus semua tables dari 1 Database MariaDB dengan konfirmasi
# OS Diuji     : CentOS 9
# Author       : Teguh Triharto
# ===========================================================

# === Konfigurasi koneksi ===
USER="admin"
PASS="admin"
HOST="localhost"
DBX="secretdb"
PORT="3306"

Popular Posts