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

Solution to inconsistent display of cursor size in input box

The cursor size in the input box is inconsistent T...

How to install Docker on Windows 10 Home Edition

I recently used Docker to upgrade a project. I ha...

Call and execute host docker operations in docker container

First of all, this post is dedicated to Docker no...

Five practical tips for web form design

1. Mobile selection of form text input: In the te...

Overview of MySQL Statistics

MySQL executes SQL through the process of SQL par...

Detailed explanation of MySQL slow log query

Slow log query function The main function of slow...

React.js framework Redux basic case detailed explanation

react.js framework Redux https://github.com/react...

Installation method of mysql-8.0.17-winx64 under windows 10

1. Download from the official website and unzip h...

15 important variables you must know about MySQL performance tuning (summary)

Preface: MYSQL should be the most popular WEB bac...

How to implement html input drop-down menu

Copy code The code is as follows: <html> &l...

Detailed explanation of JavaScript's Set data structure

Table of contents 1. What is Set 2. Set Construct...

Tutorial on installing Tomcat server under Windows

1 Download and prepare First, we need to download...