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

How to set up automatic daily database backup in Linux

This article takes Centos7.6 system and Oracle11g...

Vue opens a new window and implements a graphic example of parameter transfer

The function I want to achieve is to open a new w...

MariaDB-server installation of MySQL series

Table of contents Tutorial Series 1. Install Mari...

MYSQL database basics - Join operation principle

Join uses the Nested-Loop Join algorithm. There a...

A simple method to implement Linux timed log deletion

Introduction Linux is a system that can automatic...

Problems with index and FROM_UNIXTIME in mysql

Zero, Background I received a lot of alerts this ...

Detailed explanation of HTML style tags and related CSS references

HTML style tag style tag - Use this tag when decl...

Instructions for nested use of MySQL ifnull

Nested use of MySQL ifnull I searched online to s...

4 ways to view processes in LINUX (summary)

A process is a program code that runs in the CPU ...

JS deep and shallow copy details

Table of contents 1. What does shallow copy mean?...

Several ways to submit HTML forms_PowerNode Java Academy

Method 1: Submit via the submit button <!DOCTY...

Detailed explanation of keywords and reserved words in MySQL 5.7

Preface The keywords of MySQL and Oracle are not ...