Detailed explanation of the installation, configuration, startup and shutdown methods of the Mysql server

Detailed explanation of the installation, configuration, startup and shutdown methods of the Mysql server

1. Download from official website:

https://dev.mysql.com/downloads/

Find MySQL Community Server and click

insert image description here

Click download, you can choose the download path, I downloaded it in the D drive:

insert image description here

insert image description here

insert image description here

After downloading, you need:
Create a new mysql.ini file content:

[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 to basedir=D:\java web\mysql\mysql-8.0.27-winx64

#Set the storage directory of mysql database data datadir=D:\java web\mysql\mysql-8.0.27-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

(Excerpt from notes)

Create a new data folder and create the same directory as bin: store data

insert image description here

2. After installation: Configure environment variables:

Mine is: D:\java web\mysql\mysql-8.0.27-winx64

insert image description here

insert image description here

In the settings of this computer, open the advanced properties environment variables:
path: Create a new D:\java web\mysql\mysql-8.0.27-winx64\bin:

insert image description here

insert image description here

Configured: Open the cmd command prompt as an administrator:

Type: mysqld install
Check if the installation is successful

3. Start and shut down the server

net start mysql //Start
net stop mysql //Close

You can also:
MySQL has been installed. The server needs to be started manually by entering the cmd command. Open the command window and enter the command to start the server: mysqld --console

You can also: Find mysql in the service and start it manually

insert image description here

insert image description here

4. Log in to MySQL server

mysql -u username -p user password to open the command window and log in as the super administrator:
Enter the command mysql -u root -p and press Enter. You will be prompted to enter a password. The password is empty.

5. Change password:

Enter in mysql
ALTER USER 'root'@'localhost' IDENTIFIED BY 'your-password';
ALTER USER 'root'@'localhost' IDENTIFIED BY '密碼數字輸入或字母';

The password is: your-password

This is the end of this article about the installation, configuration, startup and shutdown methods of the MySQL server. For more relevant MySQL installation and configuration content, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • MySQL multi-instance installation boot auto-start service configuration process
  • MySQL5.7 single instance self-starting service configuration process
  • MySQL configuration master-slave server (one master and multiple slaves)
  • MySQL in Windows net start mysql Start MySQL service error occurs System error solution
  • 5 MySQL GUI tools recommended to help you with database management
  • 19 MySQL optimization methods in database management
  • Detailed introduction to 5 commonly used MySQL database management tools
  • Summary of Common Commands for MySQL Database Management
  • MySQL service and database management

<<:  What is em? Introduction and conversion method of em and px

>>:  Detailed explanation of overflow:auto usage

Recommend

What to do if the auto-increment primary key in MySQL is used up

In the interview, you should have experienced the...

Practical Optimization of MySQL Paging Limit

Preface When we use query statements, we often ne...

The benefits of div+css and web standard pages

The div element is used to provide structure and b...

Steps to introduce PWA into Vue project

Table of contents 1. Install dependencies 2. Conf...

Detailed installation and use of docker-compose

Docker Compose is a Docker tool for defining and ...

How to solve the element movement caused by hover-generated border

Preface Sometimes when hover pseudo-class adds a ...

Linux service monitoring and operation and maintenance

Table of contents 1. Install the psutil package S...

Summary of commonly used performance test scripts for VPS servers

Here is a common one-click performance test scrip...

WeChat applet custom bottom navigation bar component

This article example shares the specific implemen...