Detailed tutorial for installing MySQL 8.0.11 compressed version under win10

Detailed tutorial for installing MySQL 8.0.11 compressed version under win10

After reinstalling my computer recently, I downloaded the unzipped version of MySQL 8.0.11 based on the obsessive-compulsive principle of only installing the latest version.

However, there are so many installation tutorials I found on the Internet, and none of them can be installed successfully. I am really drunk. Here I will write down my own successful installation method to share with you.

1. Environment variable configuration

First, download the latest MySQL 8.0.11 database from the official website, unzip it to the drive letter you need to place it in, preferably without Chinese characters, and then create a new MYSQL_HOME

The parameter is the bin file path of the mysql installation file after decompression, such as mine:

Variable Name: MYSQL_HOME

Variable value: E:\tools\database\mysql\mysql8.0.11\mysql-8.0.11-winx64\bin

Then add %MYSQL_HOME% to the beginning of the Path variable, then confirm and save;

2. Configure the my.ini file

[mysqld]
# Set port 3306 port=3306
# Set the installation directory of mysql basedir=E:\\tools\\database\\mysql\\mysql8.0.11\\mysql-8.0.11-winx64
# Set the storage directory of mysql database data datadir=E:\\tools\\database\\mysql\\mysql8.0.11\\data
# Maximum number of connections allowed max_connections=200
# The number of connection failures allowed. This is to prevent someone from trying to attack the database system from this host max_connect_errors = 10
# The default character set used by the server is utf8mb4
character-set-server=utf8mb4
#Use the --skip-external-locking MySQL option to avoid external locking. This option is enabled by default external-locking = FALSE
# The default storage engine that will be used when creating a new table default-storage-engine=INNODB 
# By default, the "mysql_native_password" plug-in is used for authentication. default_authentication_plugin=mysql_native_password

[mysqld_safe]
log-error=E:\\tools\\database\\mysql\\mysql8.0.11\\mysql_oldboy.err
pid-file=E:\\tools\\database\\mysql\\mysql8.0.11\\mysqld.pid
# Define the sql syntax that mysql should support, data verification sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[mysql]
# Set the default character set of the mysql client to default-character-set=utf8mb4
[client]
# Set the default port used by the mysql client to connect to the server port = 3306
default-character-set=utf8mb4

Create a new my.txt file in the mysql directory. It can be the same as my settings, or you can read the official documentation and configure it yourself.

The following configurations need to be explained:

basedir: the installation directory of mysql

datadir: The location where the database data is stored. Please modify it according to your own needs.

log-error: Here you also need to set it according to your own file directory

pid-file: Set it according to your own file directory

Also note that the file path is no longer a single "\" as in version 5.x, but "\\"

After configuration, save it and change the suffix to my.ini

Another point to note: Although you wrote data on the path, you must not create a new file yourself, otherwise MySQL will report that data already exists and cannot be initialized.

3. Initialize the database

At this time, open cmd and start it as administrator

1. Type the command drive letter: For example, my e:

2. cd E:\tools\database\mysql\mysql8.0.11\mysql-8.0.11-winx64\bin

3. Enter the mysqld --initialize --user=mysql --console command to initialize the database. After a while, an initial password will appear. Be sure to copy and paste it into a document.

4. After a while, it will prompt that the initialization is successful, and then execute mysqld --install to prompt that the installation is successful

4. Modify the initial password of the root account

Run cmd and enter:

net start mysql

After mysql starts, enter:

mysql -u root -p

You will be prompted to enter a password. The initial password you saved is used here. After entering it, you will be prompted to welcome. Next, modify the initial password

ALTER USER 'root'@'localhost' IDENTIFIED BY 'new password';

Remember that the statement with ';' will prompt success, then enter

FLUSH PRIVILEGES;

To refresh the database user, the installation is now complete. You can try to create a new table and query a certain data. It is really faster than 5.x.

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • MySQL 8.0.11 installation summary tutorial diagram
  • Detailed installation tutorial of mysql-8.0.11-winx64.zip
  • mysql8.0.11 winx64 installation and configuration method graphic tutorial (win10)
  • MySQL Community Server 8.0.11 installation and configuration method graphic tutorial
  • MySQL 8.0.11 Community Green Edition Installation Steps Diagram for Windows
  • MySQL 8.0.11 compressed version installation and configuration method graphic tutorial
  • MySql 8.0.11 installation and configuration tutorial
  • MySQL 8.0.11 MacOS 10.13 installation and configuration method graphic tutorial
  • MySQL 8.0.11 MSI version installation and configuration graphic tutorial
  • MySQL 8.0.11 Installation Guide for Mac

<<:  How to implement parent-child component communication with Vue

>>:  Summary of some situations when Docker container disk is full

Recommend

Mysql database design three paradigm examples analysis

Three Paradigms 1NF: Fields are inseparable; 2NF:...

JavaScript to achieve lottery effect

This article shares the specific code of JavaScri...

MySQL string splitting operation (string interception containing separators)

String extraction without delimiters Question Req...

Introduction to HTML basic controls_PowerNode Java Academy

The <input> tag The <input> tag is us...

JavaScript to achieve simple provincial and municipal linkage

This article shares the specific code for JavaScr...

In-depth explanation of MySQL learning engine, explain and permissions

engine Introduction Innodb engine The Innodb engi...

Steps to build a file server using Apache under Linux

1. About the file server In a project, if you wan...

The vue project realizes drawing a watermark in a certain area

This article shares with you how to use Vue to dr...

How to create a Pod in Kubernetes

Table of contents How to create a Pod? kubectl to...

Comprehensive summary of mysql functions

Table of contents 1. Commonly used string functio...

Teach you about react routing in five minutes

Table of contents What is Routing Basic use of pu...

WeChat Mini Program video barrage position random

This article shares the specific code for randomi...

MySQL Workbench download and use tutorial detailed explanation

1. Download MySQL Workbench Workbench is a graphi...

How to clear default styles and set common styles in CSS

CSS Clear Default Styles The usual clear default ...

The top fixed div can be set to a semi-transparent effect

Copy code The code is as follows: <!DOCTYPE ht...