Download and install the MySQL-5.7.19-winx64 decompressed version

 

1. First enter the MySQL official website to download.

Enter the official website to download link : HTTPS: //dev.mysql.com/downloads/

2. The following explanation to mysql-5.7.19-winx64 version.

Ini configuration file:

If not unpacked my.ini file, create a my.ini file their own

My.ini to copy D: \ under software \ mysql \ mysql-5.7.19-winx64 \ bin path

 

Add the following configuration:

 

 

 

3. Modify configuration environment variable
added in the Path:; D: \ Software \ MySqll \ MySQL-5.7.19-Winx64 \ bin

 

 


4. Enter cmd ( enter as administrator )

Mysql initialization data and create a root user has a blank password, open cmd execute the following command:

a, installation services performed before the initialization data directory

Execute mysqld -install

Appeared lost MSVCR120.dll, missing components, install the following components to solve

https://www.microsoft.com/zh-CN/download/details.aspx?id=40784

vcredist_x64.exe

vcredist_x86.exe

Successful installation displays Service successfully installed!

b, initialize the data directory to start mysql

Use mysqld --initialize-insecure (set to empty password),

Use mysqld -initialize (random password)

Run mysqld --initialize-insecure (if there is no data directory init not exist, they can not start successfully)

See Step 6 Change Password

Note: Use the mysqld -initialize, the password is randomly generated, can be found in the error log in mysql

(Mysql .err the data file to the end)

For example, I log: A temporary password is generated for root @ localhost: 6hk20yueza = M
command to change the password: ALTER USER 'root' @ ' localhost' IDENTIFIED BY ' new password'

Initialized best to copy data directory my.ini

d, mysql service command

net start mysql start the service

You may experience problems can not find the path, modify the registry under the mysql:

HKEY_LOCAL_MACHINE \ SYSTEM \ ControlSet001 \ Services \ MySQL \ ImagePath
my registry: ImagePath = D: \ software \ mysql \ mysql-5.7.19-winx64 \ bin \ mysqld MySQL
into their own paths where msyqld

net stop mysql to stop the service

sc delete mysql remove services

 

 

5. Use the mysqld --initialize-insecure (set to empty password)

Log in mysql (mysql service to ensure startup state): Go to D: \ mysql \ mysql-5.7.19-winx64 \ bin

Execute mysql -uroot -p command to display the prompt for the password, hit enter will successfully log in to the mysql as the root of the


6. change your password
is also entered into the D: \ software \ mysql \ mysql -5.7.19- winx64 \ bin directory.
Execute mysqladmin -uroot -p password plus the password you want to set the 
prompts to enter the old password (original password is blank), hit enter on line


7. SQLyog and Navicat is recommended to use visualization tools.

Links: https://pan.baidu.com/s/11gIlZKxoTG5BCCcoXdVJRg extraction code: ntu7

 

PS: Before reloading system, install mysql meet a lot of the pit, so summarized below. Screenshot follows the previous section, so see 5.7.17.

 

Published 17 original articles · won praise 3 · views 10000 +

Guess you like

Origin blog.csdn.net/Tolove_dream/article/details/73477881