使用bat文件安装mysql

时间:2018-08-08 10:37:57

标签: mysql batch-file

当我执行以下脚本时,我的sql安装卡在图中所示的位置。请让em知道我要去哪里了。这是Win10 OS enter image description here

                                @echo off
                                cls
                                echo ==========================================
                                echo MySQL Server - Installation - v.17/03/2014
                                echo ==========================================
                                echo .
                                echo .
                                rem ------------------------------------------------
                                echo Installing. Wait ...
                                msiexec /i "mysql-essential-5.1.68-win32.msi" /qb
                                echo Done.
                                rem ------------------------------------------------
                                echo .
                                echo .
                                rem ------------------------------------------------
                                echo Configurating. Waiting ...
                                cd "C:\Program Files\MySQL\MySQL Server 5.1\bin\"
                                mysqlinstanceconfig.exe -i -q ServiceName=MySQL RootPassword=1234 ServerType=DEVELOPER DatabaseType=INODB Port=3306 Charset=utf8
                                echo Done.
                                rem ------------------------------------------------
                                echo .
                                echo .
                                rem ------------------------------------------------
                                echo Creating access to user. Waiting ...
                                cd "C:\Program Files\MySQL\MySQL Server 5.1\bin\"
                                mysql -uroot -pmypassword --execute="GRANT ALL PRIVILEGES ON . TO 'root'@'%%' IDENTIFIED BY '1234' WITH GRANT OPTION;"
                                mysql -uroot -pmypassword --execute="FLUSH PRIVILEGES;"
                                echo Done.
                                rem ------------------------------------------------
                                echo .
                                echo .
                                echo Installation ready.
                                echo .
                                echo .
                                pause

0 个答案:

没有答案