Tutorial on installing MySQL8 compressed package version on Win10

Tutorial on installing MySQL8 compressed package version on Win10

1 Download MySQL8 from the official website and install it

MySQL8 Download Address

This download is a compressed package, which can be unzipped to the specified directory after downloading.

2 Configure environment variables

Add D:\Development\MySQL\mysql-8.0.19-winx64\bin to the environment variable Path. Of course, you can also write a MYSQL_HOME first, and then add a %MYSQL_HOME%\bin to the Path.

3 Create a configuration file

Create a file my.ini and a folder data in the installation directory.

Add configuration in my.ini

[mysql]
# Set the default character set of the mysql client to default-character-set=utf8
[mysqld]
#Set port 3306 port = 3306
# Set the installation directory of mysql basedir=D:\Development\MySQL\mysql-8.0.19-winx64
# Set the storage directory of mysql database data datadir=D:\Development\MySQL\mysql-8.0.19-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 = 20
# The default character set used by the server is the 8-bit latin1 character set character-set-server=utf8
# The default storage engine that will be used when creating a new table default-storage-engine=INNODB

Note that basedir and datadir should be written according to your own MySQL installation path.

4 Initialization

In Win10, search for cmd, right-click, and select Run as administrator.

Use the command mysqld --initialize --console . This will initialize mysql and generate a default password. Be sure to write it down for later use.

2020-04-15T06:46:00.848471Z 0 [System] [MY-013169] [Server] D:\Development\MySQL\mysql-8.0.19-winx64\bin\mysqld.exe (mysqld 8.0.19) initializing of server in progress as process 10988
2020-04-15T06:46:00.849603Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
2020-04-15T06:46:14.755339Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: Bqk0%=Jda2kJ

You can see Bqk0%=Jda2kJ , and a temporary password is generated.

4.1 Error:由于找不到vcrruntime140-1.dll無法繼續執行代碼

If an error message appears when running the command and由于找不到vcrruntime140-1.dll無法繼續執行代碼, the reason is that the vcrruntime140-1.dll file is missing in C:\WINDOWS\system32 system32 directory. Download one from the Internet and put it in the C:\WINDOWS\system32 directory.

vcrruntime140-1.dll download address

5 Install MySQL

Run the command mysqld --install mysql8

Among them, mysql8 is the service name I gave to msyql myself. You can name it according to your needs.

After the command is successfully executed, it will prompt Service successfully installed.

6 Startup

Run the command net start mysql8 , where mysql8 is the name you gave to the msyql service in step 5.

If the startup is successful, there will be a prompt:

mysql8 service is starting..
The mysql8 service has been started successfully.

7 Enter mysql

Now connect to the database through Navicat (you can also log in from the command line, you can search Baidu for specific operations), and log in using the temporary password obtained in step 4. Then change the password to root. The temporary password is too difficult to remember. I entered the initial password manually through cmd and made mistakes many times. If you want to use the command line, type mysql -u root -p , press Enter, and then enter the password.

Summarize

This is the end of this article about installing MySQL8 compressed package version in Win10. For more relevant content about installing MySQL8 in Win10, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Win10 64-bit MySQL8.0 download and installation tutorial diagram
  • MySQL 8.0.16 compressed version download and installation tutorial under Win10 system
  • Installation and configuration tutorial of MySQL 8.0.16 under Win10
  • Problems and solutions when installing MySQL8.0.13 on Win10 system
  • mysql8.0.11 winx64 installation and configuration method graphic tutorial (win10)

<<:  Steps to use VMWare to build a Linux environment under Windows (picture and text)

>>:  Advanced crawler - Use of Scrapy_splash component for JS automatic rendering

Recommend

Brief analysis of MySQL union and union all

In the database, both UNION and UNION ALL keyword...

Detailed Analysis of Event Bubbling Mechanism in JavaScript

What is bubbling? There are three stages in DOM e...

About the location of the H1 tag in XHTML

There has been a lot of discussion about H1 recent...

JS uses canvas technology to imitate echarts bar chart

Canvas is a new tag in HTML5. You can use js to o...

Detailed explanation of the use of MySQL DML statements

Preface: In the previous article, we mainly intro...

How to add Vite support to old Vue projects

1. Introduction I have taken over a project of th...

Detailed explanation of MySQL transactions and MySQL logs

Transactional Characteristics 1. Atomicity: After...

Solution to MySql service disappearance for unknown reasons

Solution to MySql service disappearance for unkno...

DOCTYPE Document Type Declaration (Must-Read for Web Page Lovers)

DOCTYPE DECLARATION At the top of every page you w...

Introduction to the use and advantages and disadvantages of MySQL triggers

Table of contents Preface 1. Trigger Overview 2. ...

A brief discussion on the magical uses of CSS pseudo-elements and pseudo-classes

CSS plays a very important role in a web page. Wi...

Implementation code for using mongodb database in Docker

Get the mongo image sudo docker pull mongo Run th...

mysql5.6.8 source code installation process

Kernel: [root@opop ~]# cat /etc/centos-release Ce...