批处理方式--还原MySQL数据库

批处理方式-还原MySQL数据库中指定库

@echo off
color f0
title  还原MySQL数据库中指定库
color 0a


echo --删除MySQL数据库中的tt库
echo y|D:\zz\mysql\bin\mysqladmin -uroot -prootsasa -P3336 drop tt 

echo --创建MySQL数据库中的tt库
D:\zz\mysql\bin\mysqladmin -uroot -prootsasa -P3336 create tt

echo --初始化MySQL数据库中的tt库【tt.sql数据脚本】
D:\zz\mysql\bin\mysql -h127.0.0.1 -uroot -prootsasa -P3336 tt < D:\tt.sql


pause>nul
发布了46 篇原创文章 · 获赞 8 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/qq_38056435/article/details/101540454