Detailed tutorial on MySQL installation and configuration

Detailed tutorial on MySQL installation and configuration

Installation-free version of MySQL

MySQL is a relational database management system that uses the SQL language, which is the most commonly used language for accessing databases.

Standardized language, with the characteristics of small size, fast speed, low total cost of ownership, especially the open source feature. In terms of Web applications, MySQL is one of the best RDBMS (Relational Database Management System) application software.

In this blog post, I mainly use the MySQL free installation version as an example to help you solve the steps of installing and configuring MySQL.

First: you need to enter the MySQL official website (MySQL official website --> https://www.mysql.com/), here are the detailed steps:↓

(To facilitate your operation, there is an installation package in my network disk:

Link: https://pan.baidu.com/s/1JUOs_alvH6ZQixAHiDxi9A

Extraction code: 9r5v )

1. Download the installation package:

①After entering the official website, click "Dowload" and then scroll down the page

②The next page you see is like this. The link in the red box is the MySQL Community Edition, which is a free version of MySQL. Then we click the link in this box:↓

③Next, jump to this page, where we just need to download the community version of Server:↓

④Download the free installation version (except for systems other than Windows)

***In this way, the installation package is downloaded!

***Note that the installed directory should be placed in the specified location. Secondly, avoid Chinese characters in the absolute path. It is recommended to use English as the naming condition! ! ! ! (mine is for reference)

2. MySQL configuration

*Open the command line as an administrator (as shown below). You must be an administrator, otherwise errors will occur because some subsequent commands require permissions!

①Go to the bin directory of mysql:

②Install mysql service: mysqld --install

③ Initialize mysql. Here, the initialization will generate a random password, as shown in the box below. Remember this password, which will be used later (mysqld --initialize --console)

④Start the mysql service (net start mysql)

⑤Login verification, whether MySQL is installed successfully! (Note that the random password generated above does not include the space before the previous symbol, otherwise the login will fail). If it is the same as shown in the figure below, it means that your MySQL has been installed successfully! Note that you must enable the service first, otherwise the login will fail and an access denied prompt will appear! ! !

To change your password:

Because the random password generated by initialization is too complicated, it is not convenient for us to log in to MySQL, so we should change a password that we can remember! !

Log in again to verify the new password:

Set the system's global variables:

In order to facilitate the login and operation of mysql, we set a global variable here:↓

① Click "My Computer"-->"Properties"-->''Advanced System Settings''-->''Environment Variables'', and then proceed as shown below

②Add the newly created mysql variable to the Path path variable and click OK to complete:

After the configuration is complete, whenever we want to use MySQL with the command line, we only need to press win+R, --> enter "cmd" to open the command line, and then enter the login sql statement.

③Create an ini or cnf configuration file in the mysql directory. Here I created an ini configuration file, which contains some basic configurations of mysql.

[mysqld]
character-set-server=utf8mb4
bind-address=0.0.0.0
port=3306
default-storage-engine=INNODB
[mysql]
default-character-set=utf8mb4
[client]
default-character-set=utf8mb4

In this way, a free installation version of Mysql is installed and configured

2.1 Possible Problems

1. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO/YES)

2. "The code execution cannot continue because MSVCR120.dll was not found. Reinstalling the program may fix this problem" or "The code execution cannot continue because VCRUNTIME140_1.dll was not found. Reinstalling the program may fix this problem"

3. When "net start Mysql" is used to start the service, it displays "Mysql service is starting. Mysql service cannot start. The service does not report any errors."

Solution: Move to my other two blogs

1. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO/YES)

2. Solve the MySQL problem: The code cannot be executed because MSVCR120.dll is not found. Reinstalling the program may solve this problem.

3. To be continued. I am writing a related blog. If you encounter this problem, you can comment and the blogger will reply and solve it.

2.2 Command Reference:

①Install service: mysqld --install

② Initialization: mysqld --initialize --console

③Start the service: net start mysql

④Shut down the service: net stop mysql

⑤Log in to mysql: mysql -u root -p

Enter PassWord:(password)

⑥Change password: alter user 'root'@'localhost' identified by 'root'; (by followed by the password)

⑦Mark to delete the mysql service: sc delete mysql

The article can be reproduced in its entirety or in part, and the source can be indicated → just post the original link to show your appreciation.

This concludes this article on MySQL installation and configuration - detailed tutorial. For more information on MySQL installation and configuration, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Installation of mysql5.7 and implementation process of long-term free use of Navicate
  • Detailed introduction to the MySQL installation tutorial under Windows
  • MySQL 8.0.23 installation and configuration method graphic tutorial under win10
  • Detailed installation process and basic usage of MySQL under Windows

<<:  How to deploy k8s in docker

>>:  Several solutions for CSS record text icon alignment

Recommend

Introduction to who command examples in Linux

About who Displays users logged into the system. ...

CSS+HTML to realize the top navigation bar function

Implementation of navigation bar, fixed top navig...

Pitfall notes of vuex and pinia in vue3

Table of contents introduce Installation and Usag...

This article helps you understand PReact10.5.13 source code

Table of contents render.js part create-context.j...

Implementation of Docker deployment of Nuxt.js project

Docker official documentation: https://docs.docke...

How to use Linux to calculate the disk space occupied by timed files

Open the scheduled task editor. Cent uses vim to ...

MySQL sorting principles and case analysis

Preface Sorting is a basic function in databases,...

Detailed explanation of the difference between JavaScript onclick and click

Table of contents Why is addEventListener needed?...

Solution to Chinese garbled characters when operating MySQL database in CMD

I searched on Baidu. . Some people say to use the...

Vue recursively implements custom tree components

This article shares the specific code of Vue recu...

Basic usage of JS date control My97DatePicker

My97DatePicker is a very flexible and easy-to-use...

CSS -webkit-box-orient: vertical property lost after compilation

1. Cause The requirement is to display two lines,...

Linux system file sharing samba configuration tutorial

Table of contents Uninstall and install samba Cre...

How to implement property hijacking with JavaScript defineProperty

Table of contents Preface Descriptors Detailed ex...

What is JavaScript anti-shake and throttling

Table of contents 1. Function debounce 1. What is...