mysql-tool-v2.3.sh
#!/bin/bash ####################################################### # 名字: mysql-tool.sh # 版本: v2.3 # 作者: ysh # 功能: MySQL 数据库管理工具 # 创建日期: 2019-09-23 # 备注: 此脚本为合生科技 MySQL 数据管理使用 ####################################################### export MYSQL_PWD=$(dc -e 27992624244640545969914199055074927928074P) shell_dir=$(cd "$(dirname "$0")";pwd) bin_dir="/srv/mysql3306/bin/mysql" user="root" port="3306" host="192.168.%.%" db_conn="${bin_dir} -u${user} -P${port}" log(){ local text;local logtype;local time time=$(date +'%F %H:%M:%S') logfile=${shell_dir}/mysql-tool.log logtype=$1 text=$2 case $logtype in error) #echo -e "