zoukankan      html  css  js  c++  java
  • mysql 免安装精简版

    百度云盘连接:https://pan.baidu.com/s/1hPBnnYtTm2joIvADYs__UA 

    提取码 :5aeh

    脚本生成配置文件,/mysql/my.ini

    数据库用户密码:root/123456。

    数据库建立完成,导入库后,直接复制根目录就可以完整复制整个库。

    /instalMysql.bat

    %1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit cd /d "%~dp0"
    
    
    
    @echo off
    
    
    cd /d %~dp0
    set mysqlDir=%cd%mysql
    set MYSQL_SERVER_NAME=mysql_alarm
    echo "======================check server exist====================="
    SC QUERY %MYSQL_SERVER_NAME% > NUL
    IF ERRORLEVEL 1060 GOTO NOTEXIST
    GOTO EXIST
    
    :NOTEXIST
        ECHO not exist mysql56 service
        ECHO "%mysqlDir%mysql.bat"
        Call %mysqlDir%mysql.bat
        GOTO END
    
    :EXIST
        ECHO exist %MYSQL_SERVER_NAME% service
        sc query |find /i "%MYSQL_SERVER_NAME%" >nul 2>nul
        REM 如果服务开启,跳转至started标签
        if not errorlevel 1 (goto started) else goto notstarted
    
        :started
            REM 这里写服务存在时用的代码
            echo %MYSQL_SERVER_NAME% server is open
            goto END
    
        :notstarted
            REM 这里写服务不存在时用的代码
            echo   %MYSQL_SERVER_NAME% server is closed
            net start mysql_alarm
            goto END
    
    
    
    GOTO END
    
    :END
    
    pause
    

      /mysql/mysql.bat

    %1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit cd /d "%~dp0"
    
    
    
    @echo off
    
    
    rem **********************************MySQL环境变量部署*****************************************
    cd /d %~dp0
    del /F %cd%my.ini
    echo delete my.ini
    echo [mysqld]>> my.ini
    echo port = 3308>> my.ini
    echo basedir=%cd:=\%>>my.ini
    echo datadir=%cd:=\%\data>> my.ini
    echo character-set-server=utf8>> my.ini
    echo [client]>> my.ini
    echo port = 3308>> my.ini
    echo default-character-set=utf8>>my.ini
    echo loose-default-character-set=utf8>>my.ini
    echo [WinMySQLAdmin]>> my.ini
    echo basedir=%cd:=\%\bin\mysqld.exe>> my.ini
    echo user=root>> my.ini
    echo create my.ini
    cd /d %~dp0
    
     "%~dp0"inmysqld.exe  -install mysql_alarm  --defaults-file="%cd%my.ini"
    
    net start mysql_alarm
    
    pause
    

      

  • 相关阅读:
    在Arch上使用Fcitx5
    博客园图片居中
    冒泡排序算法
    检查字符串是否包含另一串字符串(c++)
    辗转相除法(求最大公约数或最小公倍数)
    二叉树等总结
    应用jfinal发送微信模板消息的一个bug
    线程中wait/notify/notifyAll的用法
    应用jfinal时要注意区分Db.query和Db.find
    从源码角度简单看StringBuilder和StringBuffer的异同
  • 原文地址:https://www.cnblogs.com/heshana/p/13751000.html
Copyright © 2011-2022 走看看