In the win, installation MySQL5.7

1. Download

Use mysql version free download from the official website, compression mysq5.7 packet format, win64 bit.

2, Environment Variables

After decompression, the D: \ software \ mysql-5.7.27-winx64 \ bin added to the Path.

3, installation and initialization

In mysql bin directory, the new my.ini file.

[mysql] 
# mysql client set the default character set 
default Character-SET-UTF8 = 
[mysqld] 
# 3306 port disposed 
Port = 3306 
# mysql installation directory setting 
the basedir = D: \ Software \ mysql-5.7.27-Winx64 
# Set data storage directory mysql database 
DATADIR = D: \ Software \ data \ mysql-5.7.27-Winx64 
# maximum number of connections 
max_connections = 200 is 
# character set used by the server defaults to the 8-bit coded character set latin1 
character-set utf8 = -server 
# when you create a new table using the default storage engine 
default-storage-engine = INNODB

 

Next, open the cmd window with administrator privileges.

cd to D: \ software \ mysql-5.7.27-winx64 \ bin directory, execute the following command.

mysqld --initialize-insecure --user=mysql
mysqld.exe install
net start mysql

Now, you can log mysql.

mysql -u root -p

No password, hit enter.

 

4, the first root password

Use the command mysqladmin.exe -u root password root123, set the root password.

 

5, the visual connection means

Common navicat and sqlyog.

 

Guess you like

Origin www.cnblogs.com/wuyicode/p/11448019.html