Open URL: https://dev.mysql.com/downloads/mysql/
Pull to the bottom of the page, down to download this Windows (x86, 64-bit), ZIP Archive
After downloading, create a folder in the D drive, MySQL, unzip to the folder
Create a Notepad, modify the name and the extension: My.ini, open the file to write:
[Mysqld]
# Set 3306 port
port=3306
# set up the MySQL installation directory
basedir=d:\\mysql\\
# Set up a storage directory for MySQL database data
Datadir=d:\\mysql\\data
# Maximum number of connections allowed
max_connections=200
# Number of failed connections allowed
max_connect_errors=10
# The default character set used by the server is UTF8
Character-set-server=utf8
# The default storage engine that will be used when creating a new table
Default-storage-engine=innodb
# default using "Mysql_native_password" Plugin authentication
Default_authentication_plugin=mysql_native_password
[MySQL]
# Set the MySQL client default character set
Default-character-set=utf8
[Client]
# Set the default port to use when MySQL client connects to the server
port=3306
Default-character-set=utf8
Where, two paths, modified to extract the path, a path after adding data, for storing
Add the path under the Bin directory to the environment variable
In the cmd command line, switch to the bin directory and execute mysqld--initialize--console
Save the generated record in [email protected]: The following random string, this is the password to enter the database
Install MySQL service:mysqld--install [service name]
If you only want to install a MySQL computer, you do not have a service name, the default is to generate the MySQL service name, if it exists, the use of mysqld-remove first removed, in the generation
After the build, use net start MySQL to start MySQL
Input: Mysql-u root-p return, enter password
ALTER USER ' root ' @ ' localhost ' identified with Mysql_native_password by ' new password ';
Use this command to change the password.
MySQL 8.0.11 Windows installation