package mysql

import (
	"log"
	"os"
	"os/exec"
)

var AllCmiiTableList = []string{}

func main() {
	cmd := exec.Command("/root/wdd/mysql/bin/mysqldump",
		"-uroot",
		"-pQzfXQhd3bQ",
		"-h172.28.0.251",
		"-P33306",
		"-t",
		"--set-gtid-purged=OFF",
		"cmii_nacos_config",
		"config_info",
		"his_config_info",
		"roles",
		"users",
	)

	outputFile, err := os.Create("cmii_nacos_config.sql")
	if err != nil {
		log.Fatalf("Failed to create output file: %v", err)
	}
	defer outputFile.Close()

	cmd.Stdout = outputFile
	cmd.Stderr = os.Stderr

	if err := cmd.Run(); err != nil {
		log.Fatalf("Command execution failed: %v", err)
	}
}
