MySQL 8.0.19 installation and configuration tutorial under Windows 10

MySQL 8.0.19 installation and configuration tutorial under Windows 10

I will be learning MySQL next semester. I didn't practice it at home beforehand. I didn't expect that it would take me a long time to install it, so I decided to organize it for your reference.

The first step is to download the installation package:

Official Website

After all, it is a product of Oracle, and it is really slow to download it from the official website!

There are two options here, I suggest you choose the first one (because I downloaded the second one first, but it failed, I don't know why it always goes wrong.)

After downloading, choose a path to decompress it.

The second step is to configure my.ini:

Create a new text file in the root directory and copy the following content. Note that the suffix should be changed to .ini

[mysqld]
# Set port 3306 port=3306
# Set the mysql installation directory basedir=C:\Program Files\mysql-8.0.18-winx64
# Set the storage directory of mysql database data datadir=C:\Program Files\mysql-8.0.18-winx64\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 UTF8
character-set-server=utf8
# 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
[mysql]
# Set the default character set of the mysql client to default-character-set=utf8
[client]
# Set the default port used by the mysql client to connect to the server port = 3306
default-character-set=utf8

The third step is to configure the environment variables:

1. Create a new system variable: (the variable value is the path, modify it according to your own situation)

2. Then add the last line in the following figure to the path of the system variable (note there is a semicolon at the end)

The third step is to initialize and start:

1. Open cmd as an administrator (must be opened as an administrator), cd to the bin directory of the mysql folder,
Initialization will print the database password. Remember the password as it will be used later.
mysqld --initialize --console

jo)?/kia(k4>B is the password. It is recommended to copy and save it. There is an error here. It does not affect the installation. Don't worry about it for now (I finally found that the reason is the problem of my.ini file. The one I gave above is fine)

If a pop-up window prompts: "MySQL: Code execution cannot continue because VCRUNTIME140_1.dll was not found. Reinstalling the program may resolve this issue."

Solution: Download the "Microsoft Common Runtime Library Collection", unzip it directly after downloading, and the problem can be solved (just search and download it on Baidu).

2. Install MySQL service: mysqld --install

3. The command to start the server is: net start mysql. In addition, the command to stop the service is: net stop mysql. Uninstall MySQL service command: sc delete MySQL/mysqld -remove

4. Log in to the database, you will be asked to enter the password
mysql -u root -p
After entering the password normally, you will enter the MySQL command mode

Change the password after logging in:

For example, change the password to: 123456

set password for root@localhost='123456';

5. Display database

show databases;

When you see the above results, it means that MySQL has been correctly installed on your computer.

Wonderful topic sharing:

MySQL different versions installation tutorial

MySQL 5.7 installation tutorials for various versions

MySQL 5.6 installation tutorials for various versions

mysql8.0 installation tutorials for various versions

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:
  • How to install MySQL 8.0.28.0.msi on Windows (with pictures and text)
  • Install MySQL 8.0.28 on Kylin V10 and implement remote access
  • MySQL 8.0.22 installation and configuration graphic tutorial
  • MySQL 8.0.22 download, installation and configuration method graphic tutorial
  • Super detailed MySQL8.0.22 installation and configuration tutorial
  • MySQL 8.0.19 installation and configuration method graphic tutorial
  • MySQL 8.0.18 installation and configuration method graphic tutorial
  • mysql 8.0.18.zip installation and configuration method graphic tutorial (windows 64 bit)
  • MySQL 8.0.18 installation and configuration method graphic tutorial under win10 (windows version)
  • MySQL 8.0.28 installation and configuration method graphic tutorial

<<:  Solution to the VMware virtual machine prompt that the exclusive lock of this configuration file failed

>>:  13 JavaScript one-liners that will make you look like an expert

Recommend

A Brief Analysis of Subqueries and Advanced Applications in MySql Database

Subquery in MySql database: Subquery: nesting ano...

Several navigation directions that will be popular in the future

<br />This is not only an era of information...

How to use VirtualBox to build a local virtual machine environment on Mac

1. Big Data and Hadoop To study and learn about b...

A simple way to implement all functions of shopping cart in Vue

The main functions are as follows: Add product in...

How to enable TLS and CA authentication in Docker

Table of contents 1. Generate a certificate 2. En...

Install Docker environment in Linux environment (no pitfalls)

Table of contents Installation Prerequisites Step...

MYSQL local installation and problem solving

Preface This article is quite detailed and even a...

Details after setting the iframe's src to about:blank

After setting the iframe's src to 'about:b...

Web project development JS function anti-shake and throttling sample code

Table of contents Stabilization Introduction Anti...

MySQL reports an error: Can't find file: './mysql/plugin.frm' solution

Find the problem Recently, I found a problem at w...

Two ways to create SSH server aliases in Linux

Preface If you frequently access many different r...

Element uses scripts to automatically build new components

Table of contents background How does element-ui&...