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

How to install JDK 13 in Linux environment using compressed package

What is JDK? Well, if you don't know this que...

Vue data two-way binding implementation method

Table of contents 1. Introduction 2. Code Impleme...

Why Nginx is better than Apache

Nginx has taken over the majority of the Web serv...

Detailed explanation of MySQL database transaction isolation levels

Database transaction isolation level There are 4 ...

How to bypass unknown field names in MySQL

Preface This article introduces the fifth questio...

Vue implements dynamic routing details

Table of contents 1. Front-end control 1. In the ...

Let you understand the working principle of JavaScript

Table of contents Browser kernel JavaScript Engin...

Detailed explanation of Vue mixin usage and option merging

Table of contents 1. Use in components 2. Option ...

Shorten the page rendering time to make the page run faster

How to shorten the page rendering time on the bro...

A brief introduction to MySQL storage engine

1. MySql Architecture Before introducing the stor...

Solve the problem of MySql8.0 checking transaction isolation level error

Table of contents MySql8.0 View transaction isola...

Detailed explanation of Getter usage in vuex

Preface Vuex allows us to define "getters&qu...

The difference between html, xhtml and xml

Development Trends: html (Hypertext Markup Languag...

Commonplace talk about the usage of MYSQL pattern matching REGEXP and like

like LIKE requires the entire data to match, whil...