Installing MySQL 8.0.12 based on Windows

Installing MySQL 8.0.12 based on Windows

This tutorial is only applicable to Windows systems. If you have installed it but not yet installed it, be sure to delete the original database first, execute: mysqld --remove mysql, and then read my post!

Step 1: Download the installation package from the MySQL official website

Step 2: Unzip the downloaded installation package (mysql-8.0.12-winx64.zip) to the corresponding path. It is recommended to install it in a disk with larger space. (My installation path is: D:\mysql-8.0.12-winx64) Be sure to remember the installation directory here! !

Step 3: Create a new configuration file in the installation directory and name it my.ini (Please note that I encountered the biggest trouble when installing it, which was not specifically mentioned in previous experience posts. To create a configuration file, first create a new text document in the folder you unzipped, and then change the format. Be sure to change the txt extension to .ini). See below for details:

The most critical step is here: copy and paste the following content in my.ini (copy it all):

[mysql]
; Set the mysql client default character set default-character-set=utf8
[mysqld]
; Set port 3306 port = 3306
; Set the installation directory of mysql basedir=D:\Software\Programming Software\Database\MySQL\mysql-8.0.12-winx64
; Set the storage directory of mysql database data datadir=D:\Software\Programming Software\Database\MySQL\mysql-8.0.12-winx64\data
; Maximum number of connections allowed max_connections=200
; 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

Step 4: Run the cmd.exe command line tool as an administrator:

Right-click Command Prompt and select Run as Administrator

Step 5: Execute the following command to go to the bin directory of the MySQL installation directory:

#Enter the MySQL installation directory:
cd /d D:\mysql-8.0.12-winx64\bin
(Do not copy and paste directly here, because the folders we create may not be the same, so be sure to check your own installation directory)

#Execute the command to install MySQL:
mysqld install

#Execute the following command to initialize the data directory (after 5.7, you must execute this command before you can start mysql)
mysqld --initialize-insecure

#Execute the following command to start mysql
net start mysql 

Step 6: Configure the password for the root account:

#Execute the following command to log in to mysql. You do not need to enter a password for the first login. Just press Enter. mysql -u root -p 

#After successful login, execute the following command to change the password (change newpassword to the password you set):
alter user 'root'@'localhost' identified with mysql_native_password by 'newpassword';
#After changing the password, execute the following command to refresh the privileges:

Step 7: Congratulations! mysql has been installed!

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:
  • Windows10 mysql 8.0.12 non-installation version configuration startup method
  • Detailed tutorial for installing mysql 8.0.12 under Windows
  • MySQL 8.0.12 decompression version installation graphic tutorial under Windows 10
  • MySQL 8.0.12 installation and configuration method graphic tutorial (Windows version)
  • MySQL 8.0.12 installation and configuration method graphic tutorial (windows10)
  • How to install and configure MySQL 8.0.12 decompressed version under Windows 10 with graphic tutorials

<<:  Understand the implementation of Nginx location matching in one article

>>:  Solution to JS out-of-precision number problem

Recommend

JavaScript to implement image preloading and lazy loading

This article shares the specific code for impleme...

Summary of common problems and application skills in MySQL

Preface In the daily development or maintenance o...

MySQL Series 7 MySQL Storage Engine

1. MyISAM storage engine shortcoming: No support ...

Solution to the data asymmetry problem between MySQL and Elasticsearch

Solution to the data asymmetry problem between My...

Install MySQL 5.7 on Ubuntu 18.04

This article is compiled with reference to the My...

In-depth explanation of the global status of WeChat applet

Preface In WeChat applet, you can use globalData ...

Ubuntu MySQL version upgraded to 5.7

A few days ago, the library said that the server ...

Implementation code of short video (douyin) watermark removal tool

Table of contents 1. Get the first link first 2. ...

Common tags in XHTML

What are XHTML tags? XHTML tag elements are the b...

SQL implementation of LeetCode (175. Joining two tables)

[LeetCode] 175.Combine Two Tables Table: Person +...

Best Practices for Sharing React Code

When any project develops to a certain complexity...

Nginx sample code for implementing dynamic and static separation

In combination with the scenario in this article,...