Tutorial on installing mysql-8.0.18-winx64 under Windows (with pictures and text)

Tutorial on installing mysql-8.0.18-winx64 under Windows (with pictures and text)

1. Download the installation package

The installation package is now at:

https://dev.mysql.com/downloads/mysql/

2. Unzip to the installation directory

Unzip the downloaded zip. The installation path I use here is:

C:\Program Files\mysql-8.0.18-winx64

After decompression, you need to manually create the data folder and my.ini file in the installation path

3. Configure the my.ini file

Edit the contents of the my.ini file

[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

Tips:

Remember that the my.ini file format must be in ANSI format, otherwise this error will be reported.

Found option without preceding group in config file

4. Initialize and start the mysql service

Run the cmd command as an administrator.

Enter the C:\Program Files\mysql-8.0.18-winx64 directory

--Initialize, the database password will be printed, remember the password, you will use it later mysqld --initialize --console
 
--Here MySql8 is the name of the service. You can leave it blank or name a service yourself mysqld --install localmysql
 
--Here is the name of the startup service, which is the name just named net start localmysql
 
--Log in to the database, then you will be asked to enter the password mysql -u root -p
 
--The password is too hard to remember, change it to: 123456
set password for root@localhost='123456';
 
--Show all databases show databases;

The initial password is the following string.

5. Installation Verification

verify

1. There is a mysql process in the process

verify

2. Use navicat to connect to the database

6. Create a database and run the specified sql file

mysql -u root -p
create database rexel_hzzg;

Execute sql file

Execute outside of mysql console

C:\Program Files\mysql-8.0.18-winx64\bin>mysql -uroot -p123456 -Drexel_hzzg<D:\rexel\sql\rexel_hzzg.sql

7. Stop the mysql process

Method 1:

net stop mysql (this shutdown requires the service to be installed);

Method 2:

mysqladmin -u root shutdown (if a password is set, the command is mysqladmin -u root -p shutdown)

Summarize

The above is the tutorial for installing mysql-8.0.18-winx64 under Windows introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • MySQL 8.0.20 installation tutorial and detailed tutorial on installation issues
  • MySQL 8.0.19 winx64 installation tutorial and change the initial password under Windows 10
  • Installation method of mysql-8.0.17-winx64 under windows 10
  • Solve the problems encountered when installing mysql-8.0.11-winx64 in Windows environment
  • mysql8.0 windows x64 zip package installation and configuration tutorial
  • MySQL 8.0.20 Installation Tutorial with Pictures and Text (Windows 64-bit)

<<:  Nginx+FastDFS to build an image server

>>:  Summary of constructor and super knowledge points in react components

Recommend

Detailed explanation of the two modes of Router routing in Vue: hash and history

hash mode (default) Working principle: Monitor th...

Build a server virtual machine in VMware Workstation Pro (graphic tutorial)

The VMware Workstation Pro version I use is: 1. F...

Implementation of vue+drf+third-party sliding verification code access

Table of contents 1. Background 2. Verification p...

MySQL deadlock routine: inconsistent batch insertion order under unique index

Preface The essence of deadlock is resource compe...

Docker container time zone adjustment operation

How to check if the Docker container time zone is...

Detailed introduction to CSS font, text, and list properties

1. Font properties color, specifies the color of ...

Usage instructions for the docker create command

The docker create command can create a container ...

How to encapsulate timer components in Vue3

background When you open the product details on s...

MySQL 8.0.18 adds users to the database and grants permissions

1. It is preferred to use the root user to log in...

A small problem about null values ​​in MySQL

Today, when testing the null value, I found a sma...

How to transfer files between Windows and Linux

File transfer between Windows and Linux (1) Use W...

Detailed explanation of four solutions to floating problems in CSS layout

1. Cause: The effect after the subbox is set to f...