Startup shutdown with batch implementation under Windows Mysql_dos/bat

Source: Internet
Author: User
Tags goto

1 CLS 2 @echo off3 : Set window font Color4 Color 0a5 : Set Window caption6 TITLE MySQL Management program by Thinkvenus7   8 Pager : Checkadmin9   Ten GotoMenu One : Menu A : Menu - CLS - Echo. the Echo=-=-=-=-Please select what you want to do with MySQL-=-=-=-=- - Echo. - Echo.1: Start MySQL - Echo. + Echo.2: Turn off MySQL - Echo. + Echo.3: Restart MySQL A Echo. at Echo.4: Exit - Echo. - Echo. =-=-=-=-Please enter the item number you want to select ↓-=-=-=- - Set/P id= - if"%id%" = = "1"GotoStartup - if"%id%" = = "2"Gotoshutdown in if"%id%" = = "3"Gotoreboot - if"%id%" = = "4"Exit to Pause +    - : Start the : Startup * Echo. $ Pager : Checkmysql1Panax Notoginseng Echo. Start MySQL ... - Net Start"MySQL" the Echo.start MySQL successfully!  + Pause  A GotoMenu the    + : Stop - : Shutdown $ Echo. $ Pager : Checkmysql2 - Echo. Close MySQL ... - NetStop "MySQL" the Echo.turn off MySQL success!  - Pause Wuyi GotoMenu the    - : Restart Wu : Reboot - Echo. About Pager : Checkmysql2 $ Echo. Close MySQL ... - NetStop "MySQL" - Echo.turn off MySQL success!  - GotoStartup A GotoMenu +    the : Exit - : Goout $ Pause the GotoMenu the    the : Check if the MySQL process exists the : Checkmysql - Set/A count=0 in  for/F "Tokens=1 delims="%%i in (' Tasklist/nh ^|Find/i "MySQL") Do(Set/a count+=1) the if%count% NEQ 0if"%1" equ "1" ( the   Echowarning: MySQL is started About   GotoGoout the) the if%count% equ 0if"%1" equ "2" ( the   Echowarning: MySQL does not start +   GotoGoout -) the   Bayi : Check if you are running as an administrator the : Checkadmin the EchoTest am I admin? >%systemroot%\system32\thinkvenus.Test - if  not exist%systemroot%\system32\thinkvenus.test ( -   EchoWarning: Please run as Administrator!  the   Pause the   Exit the) the del%systemroot%\system32\thinkvenus.test

Startup shutdown with batch implementation under Windows Mysql_dos/bat

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.