Home > database >  Installed MySQL5.7 free version of a key BAT configuration
Installed MySQL5.7 free version of a key BAT configuration

Time:12-07

@ echo off

Echo.

Echo * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Echo.

Echo start MYSQL installation, please don't close the window

Echo.

Echo, please run as an administrator

Echo.

Echo * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Pause

Echo.

Set the CDS=% ~ dp0

CDS set mysql_path=% %

Echo.

Echo installation path: % mysql_path %

Echo.

Echo.

Echo configuration environment variable

Echo.

Wmic ENVIRONMENT where "name='PATH' and the username='& lt; System> '" the set VariableValue="HTTP://https://bbs.csdn.net/topics/%path%; % % mysql_path bin."

Echo.

Echo * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Pause

Echo.

Echo * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Echo * * * * are installing MYSQL service * * * *

Echo.

Echo to stop the MYSQL service

Echo.

The set service_name=mysql

.net service_name stop % %

Echo.

Echo to delete the original DATA

Echo.

Rd/s/q % mysql_path % \ data

Echo.

Echo to delete the original MYSQL service

Echo.

% mysql_path % \ bin \ mysqld service_name exe - remove % %

Echo.

Echo initialization DATA

Echo.

Md mysql_path % % \ data

Echo.

Echo the MYSQL installation SERVICE

Echo.

% mysql_path % \ bin \ mysqld exe - the initialize - user=mysql - the console

% mysql_path % \ bin \ mysqld exe - service_name install % %


Echo * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Pause

Echo.

Echo start MYSQL SERVICE,

Echo.

Net start mysql

Echo.

The echo... The installation was successful...

Echo * * * * * * * * * * * * * * * * * * * * * important * * * * * * * * * * * * * * * * * * *

Echo.

Echo, please copy the temporary password, A temporary password position. A temporary password generated for root @ localhost: temporary password

Echo.

Echo please performed manually modify password instructions, the operating steps are as follows:

Echo.

Echo 1 administrator privileges to run CMD,

Echo.

Echo 2 input mysql -u root -p

Echo.

Echo 3 enter temporary password

Echo.

Echo 4 input the ALTER USER 'root' @ 'localhost' IDENTIFIED BY 1 qazxsw '@';

Echo.

Echo 1 qazxsw @ 5 for you to set the password, please keep in mind the password

Echo.

Echo * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

: END

Pause


  • Related