• mysql 数据进行备份以及恢复的bat文件


    备份数据

    set str_time_first_bit="%time:~0,1%"
    if %str_time_first_bit%==" " (
    set str_date_time=%date:~0,4%%date:~5,2%%date:~8,2%_0%time:~1,1%%time:~3,2%%time:~6,2%
    )else (
    set str_date_time=%date:~0,4%%date:~5,2%%date:~8,2%_%time:~0,2%%time:~3,2%%time:~6,2%
    )
    echo "str_date_time"
    echo "str_date_time"

    "C:Program FilesMySQLMySQL Server 5.6inmysqldump" --opt --single-transaction -h192.168.10.8 -uroot -proot --default-character-set=utf8mb4 -R srface > "C:usrfilesdb_backup\%str_date_time%.sql"

    还原数据

    "C:srface3.0_jpmysql-5.6.43-winx64inmysql"  -h127.0.0.1 -uroot -pGxd1234!@#$ --default-character-set=utf8mb4 srface < C:/Users/peiqiang/Desktop/20200821_175903.sql

  • 相关阅读:
    synchronized的原理
    ThreadLocal是什么?使用场景有哪些?
    什么是死锁?死锁产生的原因?
    15-错误
    14-异常处理
    13-接口
    12-方法
    11-结构体
    10-指针
    09-字符串
  • 原文地址:https://www.cnblogs.com/killclock048/p/13891931.html
Copyright © 2020-2023  润新知