MySQL installation and configuration tutorial for win10 free installation version

MySQL installation and configuration tutorial for win10 free installation version

I searched a lot online and found that many of them were not for Linux systems and were inconsistent with the current new versions. I did a small project myself and practiced it myself, and I would like to share it with everyone for reference.
MySQL version: mysql-5.7.17

Download method:

1. MySQL official website: https://www.mysql.com/downloads/
2. Download method:

a. Select the corresponding module:


b. Select the corresponding version (I choose Windows here):


c. Select the 32-bit or 64-bit version to download:


d. Click Download, it will ask you to log in or register, you can skip this:

MySQL installation and configuration

1. Unzip the downloaded .zip file and put it where you want to install it. The location is arbitrary.
Open the folder, create a new my.ini file, and enter:

[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:\mysql\mysql-5.7.17-winx64 -- your own path # Set the storage directory of MySQL database datadatadir=D:\mysql\mysql-5.7.17-winx64\data -- your own path # Allow the maximum number of connections 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

Then save it in ANSI format.

2. Open the Windows environment variable settings, put the full path of the mysql bin directory in the Path variable of the environment variable, and then add an English semicolon (;) after the path to save it.

For example, D:/mysql/mysql-5.7.17-winx64/bin;

3. Install MySQL service: mysqld –install

Start: net start MySQL
Stop: net stop MySQL
Uninstall: sc delete MySQL,mysqld -remove
The command line window must be opened in administrator mode
a. Install the service: mysqld –install.
b. Start the service net start MySQL
(There may be a problem. The MySQL service is starting. The MSQL service could not be started. The service did not report any errors. Please type NET HELPMSG 3534 for more help.
Delete the data folder and use mysqld –initialize to initialize the data directory.

4. After successfully entering the service, use

mysql -u root -p Enter
Enter the password (in the file with the suffix .err in the data folder)
Press Enter after inputting.
Note: The old version initially has no password and you can log in successfully by simply pressing Enter. In order to enhance security, the new version will generate a random password.

5. Change password

There are three ways to do this:
①Use the SET PASSWORD command: First log in to MySQL.
Format: mysql> set password for username@localhost = password('new password');
Example:mysql> set password for root@localhost = password('123');
(You can directly use mysql> set password = password('123');)
②Use mysqladmin (used when not logged in to MySQL)
Format: mysqladmin -u username -p old password password new password Example: mysqladmin -uroot -p123456 password 123
③Use UPDATE to directly edit the user table. First log in to MySQL.

mysql> use mysql;
mysql> update user set password=password('123') where user='root' and host='localhost';
mysql> flush privileges;

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:
  • About the basic configuration tutorial of MySQL5.7.17 free installation version under Win10 (with pictures and text)
  • win10 mysql 5.6.35 winx64 free installation version configuration tutorial
  • Mysql 5.7.17 winx64 free installation version, installation and configuration graphic tutorial under win10 environment
  • MySql 5.7.21 free installation version configuration method under win10

<<:  Detailed explanation of the wonderful uses of SUID, SGID and SBIT in Linux

>>:  8 tips for Vue that you will learn after reading it

Recommend

Method of building docker private warehouse based on Harbor

Table of contents 1. Introduction to Harbor 1. Ha...

Docker container operation instructions summary and detailed explanation

1. Create and run a container docker run -it --rm...

VMware vCenter 6.7 installation process (graphic tutorial)

background I originally wanted to download a 6.7 ...

Example code for CSS columns to achieve two-end alignment layout

1. Going around in circles After going around in ...

html option disable select select disable option example

Copy code The code is as follows: <select> ...

Analysis of examples of using anti-shake and throttling in Vue components

Be careful when listening for events that are tri...

Use nginx to dynamically convert image sizes to generate thumbnails

The Nginx ngx_http_image_filter_module module (ng...

MySQL GROUP_CONCAT limitation solution

effect: The GROUP_CONCAT function can concatenate...

Summary of how JS operates on pages inside and outside Iframe

Table of contents Get the content of the iframe o...

Docker container data volume named mount and anonymous mount issues

Table of contents What is a container data volume...

Usage of the target attribute of the html tag a

1: If you use the tag <a> to link to a page,...

Detailed explanation of how to solve the problem of too long content in CSS

When we write CSS, we sometimes forget about the ...

Why MySQL chooses Repeatable Read as the default isolation level

Table of contents Oracle Isolation Levels MySQL I...

GET POST Differences

1. Get is used to obtain data from the server, wh...