How to install mysql8.0.23 under win10 and solve the problem of "the service does not respond to the control function"

How to install mysql8.0.23 under win10 and solve the problem of "the service does not respond to the control function"

Install mysql under win10

1. Download MySQL from the official website

Website: https://www.mysql.com/downloads/

mysq

Scroll down the download page: click the red box below:

insert image description here

Follow the instructions below:

insert image description here

insert image description here

After downloading, unzip it:

The decompressed directory is shown below:

insert image description here

2. Configure environment variables

This computer -> Properties -> Advanced system settings -> Environment variables -> path in user variables (double-click) -> Edit (add the bin directory under the mysql installation directory). The specific steps are as follows:
(I usually add both user variables and system variables)

insert image description here
insert image description here
insert image description here
insert image description here

3. Configure the initialization my.ini file (this file does not exist in the newly unzipped directory)

my.ini file:

insert image description here

The edited content is as follows:

[mysqld]
# Set port 3306 port=3306
#Set the installation directory of mysql basedir=E:\\tools\\mysql-8.0.23-winx64\\mysql-8.0.23-winx64 #Remember to use double slashes\\, single slashes will make mistakes here #Set the storage directory of mysql database datadir=E:\\tools\\mysql-8.0.23-winx64\\mysql-8.0.23-winx64\\data #The data directory will be automatically created after initialization #The 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=utf8mb4
# 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=utf8mb4
[client]
# Set the default port used by the mysql client to connect to the server port = 3306
default-character-set=utf8mb4

4. Install mysql

(1) Open cmd and run it with administrator privileges
(2) Initialize the database
Enter the bin directory of the MySQL installation directory in cmd and execute the command:

mysqld --initialize --console

After the execution is complete, the initial default password of the root user will be printed, for example:

insert image description here

The final: ?<M6fpM)i,/q is the initial password (excluding the first space). Before changing the password, you need to remember this password as it will be needed for subsequent logins.

(3) Installation service:
Execute the command in the bin directory of the MySQL installation directory:

mysqld --install [service name]

If you do not specify a service name, the default service name is mysql.
The successful execution is as follows:

insert image description here

After the installation is complete, you can start the MySQL service through the command net start mysql.

net start mysql

After success, the following will appear:

insert image description here

If unsuccessful, start the service if the following occurs:

insert image description here

Try the solution: Visit https://cn.dll-files.com/vcruntime140_1.dll.html and download the latest version of VCRUNTIME140_1.DLL.

insert image description here

After downloading, put the unzipped file directly into the bin subdirectory of MySQL. Re-run the command: net start mysql to succeed

insert image description here

(4) Stop the service using the command net stop mysql. Uninstall the MySQL service using the command sc delete MySQL or mysqld -remove

5. Change your password

In the bin directory, enter:

mysql -u root -p

You will be prompted to enter a password: fill in the initialization password to enter the MySQL command mode.

insert image description here

Execute the command in MySQL:

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new password';

Change the password. Note that the ";" at the end of the command must be there. This is the syntax of MySQL and the new password must be enclosed in quotation marks.

At this point, the installation and deployment is complete.

This is the end of this article about installing mysql8.0.23 under win10 and the solution to the problem of "the service does not respond to control functions". For more relevant content about installing mysql8.0.23 under 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:
  • MySQL 8.0.24 version installation and configuration method graphic tutorial
  • MySQL 8.0.24 installation and configuration method graphic tutorial
  • Some improvements in MySQL 8.0.24 Release Note
  • Detailed steps for Java to connect to MySQL 8.0 JDBC (IDEA version)
  • Detailed analysis of MySQL 8.0 memory consumption
  • Detailed graphic description of MySql8.023 installation process (first installation)
  • MySQL 8.0 New Features - Introduction to the Use of Management Port
  • MySQL 8.0 New Features - Introduction to Check Constraints
  • mysql8.0.23 msi installation super detailed tutorial
  • MySQL 8.0.23 free installation version configuration detailed tutorial
  • Basic operations on invisible columns in MySQL 8.0

<<:  A brief description of the relationship between k8s and Docker

>>:  Some questions about hyperlinks

Recommend

Several common methods of sending requests using axios in React

Table of contents Install and introduce axios dep...

Summary of the use of MySQL date and time functions

This article is based on MySQL 8.0 This article i...

VMware vSAN Getting Started Summary

1. Background 1. Briefly introduce the shared sto...

3 functions of toString method in js

Table of contents 1. Three functions of toString ...

Detailed explanation of overflow-scrolling to solve scrolling lag problem

Preface If you use the overflow: scroll attribute...

Why node.js is not suitable for large projects

Table of contents Preface 1. Application componen...

Sample code for configuring nginx to support https

1. Introduction Are you still leaving your websit...

How to use Lottie animation in React Native project

Lottie is an open source animation library for iO...

Let's take a look at some powerful operators in JavaScript

Table of contents Preface 1. Null coalescing oper...

Installation method of MySQL 5.7.18 decompressed version under Win7x64

Related reading: Solve the problem that the servi...

How to handle MySQL numeric type overflow

Now, let me ask you a question. What happens when...