LiuYuan's Blog
This is LiuYuan's Blog
Toggle navigation
LiuYuan's Blog
Home
Docker相关
MySQL相关
Ansible相关
维护脚本相关
Windows系统脚本
Python相关
Nginx相关
About Me
Archives
Tags
FTP/MySQL
2024-06-20 10:06:10
28
0
0
admin
::设置dos窗口的大小 @echo off mode con cols=100 lines=50 ::打开目录 CD /D D:/test ::登录FTP echo open 192.168.200.101>ftp.txt echo oneplusexam>>ftp.txt echo 123456>>ftp.txt echo get test.rar test.rar>>ftp.txt echo bye>>ftp.txt ftp -s:ftp.txt del ftp.txt ::解压文件 "C:\Program Files\WinRAR\WinRAR.exe" x "D:/test/test.rar" ::创建文件夹 md D:\testapi ::复制代码文件 xcopy /y D:\test\testapi\* D:\testapi\ /e ::创建数据库 "D:\Program Files\MySQL\MySQL Server 5.7\bin\mysql.exe" -uroot -p0212 -e "create database test;" ::调用另一个批处理文件 call D:\test\pm2.bat ::将启动脚本写入自启动注册表 reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v testapi /t REG_SZ /d D:\testapi\start.bat /f ::调用启动批处理文件 call D:\testapi\start.bat ::设置输入变量c,循环执行恢复数据库,拷贝实操题库 :loop set/p c=请选择安装资源类型(单选,输入序号并回车)1,初级;2,中级;级 : if /i '%c%'=='1' goto 1 if /i '%c%'=='2' goto 2 echo 输入有误,请重新输入,1,初级;2,中级; :&&goto loop :1 "D:\Program Files\MySQL\MySQL Server 5.7\bin\mysql.exe" -uroot -p0212 --default-character-set=utf8 exam<D:/install_oneplusexam/resource/ABB_primary/exam.sql xcopy /y D:\install_oneplusexam\resource\ABB_primary\public-upload-doc\* D:\oneplusexamapi\public\upload\doc\ /e pause :2 "D:\Program Files\MySQL\MySQL Server 5.7\bin\mysql.exe" -uroot -p0212 --default-character-set=utf8 exam<D:/install_oneplusexam/resource/ABB_middle/exam.sql xcopy /y D:\install_oneplusexam\resource\ABB_middle\public-upload-doc\* D:\oneplusexamapi\public\upload\doc\ /e pause
Pre:
批量安装
Next:
查询harbor仓库自动更新脚本
0
likes
28
Weibo
Wechat
Tencent Weibo
QQ Zone
RenRen
Footer
Table of content