Download the MySQL installation compression package leveling address: https://pan.baidu.com/s/1XD4WnlZ2K7C1ImfmokDEww Extraction code: 5k9h
You can also download it on the official website: click on the link https:// dev.mysql.com/downloads/file/?id=487686
After downloading, decompress to the specified path and then create the my.ini file with the path and write the following content:
[client]
default-character-set=utf8 # Set mysql client default character Set
[mysqld]
port = 3306 # Set 3306 port
basedir=E:\PROJECT\mysql-8.0.17 # Set mysql Installation directory
max_connections=20 # the maximum number of connections allowed
character-set-server=utf8 # server character set
default-storage-engine=INNODB # default storage engine
# datadir=C:\sqldata # Set mysql database data storage directory< /span>
Open the cmd command line tool as an administrator and switch the directory: cd E:/PROJECT/mysql8.0.7/bin
# Initialize the database: Initial default password: w%h?X8.pGFt# span>
mysqld --initialize --console
# Installation and startup
mysqld install # install mysql
net start mysql # start the database
# Log in to the database and enter the password: w%h?X8.pGFt#
mysql -u root -p
The execution process:
Set password: set password for [email protected] = “root”;
[client]
default-character-set=utf8 # Set mysql client default character Set
[mysqld]
port = 3306 # Set 3306 port
basedir=E:\PROJECT\mysql-8.0.17 # Set mysql Installation directory
max_connections=20 # the maximum number of connections allowed
character-set-server=utf8 # server character set
default-storage-engine=INNODB # default storage engine
# datadir=C:\sqldata # Set mysql database data storage directory< /span>
# Initialize the database: Initial default password: w%h?X8.pGFt#
mysqld --initialize --console
# Installation and startup
mysqld install # install mysql
net start mysql # start the database
# Log in to the database and enter the password: w%h?X8.pGFt#
mysql -u root -p