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

JS implementation of carousel carousel case

This article example shares the specific code of ...

HTML Several Special Dividing Line Effects

1. Basic lines 2. Special effects (the effects ar...

IE6 web page creation reference IE6 default style

This is not actually an official document of IE. I...

JavaScript using Ckeditor + Ckfinder file upload case detailed explanation

Table of contents 1. Preparation 2. Decompression...

Key knowledge summary of Vue development guide

Table of contents Overview 0. JavaScript and Web ...

SQL implementation of LeetCode (196. Delete duplicate mailboxes)

[LeetCode] 196.Delete Duplicate Emails Write a SQ...

Improvements to the web server to improve website performance

<br />In the first section of this series, w...

5 ways to determine whether an object is an empty object in JS

1. Convert the json object into a json string, an...

JavaScript implements large file upload processing

Many times when we process file uploads, such as ...

Can CSS be used like this? The art of whimsical gradients

In the previous article - The charm of one line o...

Mysql implementation of full-text search and keyword scoring method example

1. Introduction Today a colleague asked me how to...

Build a file management system step by step with nginx+FastDFS

Table of contents 1. Introduction to FastDFS 1. I...