mysql5.7 download and install

First, completely disassembled Older mysql

Reference article: https: //blog.csdn.net/hui1setouxiang/article/details/89816176

Two, win10 download installation mysql5.7

Reference article: https: //blog.csdn.net/yjz_sdau/article/details/84504549

1. official website to download mysql-5.7.28-winx64.zip

zip green version, msi installation version

2. Configuration Installation

(1) E: \ haocui \ mysql-5.7.28-winx64 create a new my.ini

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

(2) Initialization mysql

Run cmd as administrator, go to the bin directory of the installation directory:

e:

cd E: \ haocui \ mysql-5.7.28-winx64 \ bin

mysqld --initialize --user=mysql --console

 

 Initial Password: GpLDFEk26E.w

 Complete data files and related documents generated installation

(3) Installation mysql

mysqld --install mysql

If the display: The service already exists !, then removes the service sc delete mysql

Display Service successfully installed. Installation is successful

(4) to start mysql

net start mysql

Display: mysql service has been launched successfully

(5) Log mysq, modify the login password is 123456

mysql -u root -p

Enter the initial password

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';

 

 3. Configure mysql environment variables

Added: mysql5.7 jdbc driver package version 5.1 can correspond;

          Mysql8.0 need the latest version of the corresponding jdbc driver package 8.0

 

Guess you like

Origin www.cnblogs.com/muxisc/p/11916968.html
Recommended