MySQL 5.7.20 free installation version configuration method graphic tutorial

MySQL 5.7.20 free installation version configuration method graphic tutorial

I have seen many relevant tutorials on the Internet, but there are still some errors in the installation process. I simply sorted them out and summarized my own mysql5.7.20 installation process for your reference. (To be honest, there are often inexplicable problems with the configuration environment)

1. Download address: Official address

Download the mysql version that suits you according to your computer. What I downloaded is shown in the picture, and my installation process is also based on this.

2. After downloading, unzip it to a custom path, and make sure there is no Chinese text.

3. After decompression, create a new ini file named my.

The content of my is:

[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:\KQQ\mysql-5.7.20-winx64 
# Set the storage directory of mysql database data datadir=D:\KQQ\mysql-5.7.20-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

As shown in the figure:

4. Configure environment variables to avoid having to execute in the bin directory under the installation directory every time.

The configuration process is as follows:

- Right-click My Computer, select Properties, Advanced Settings, Environment Variables, edit the path variable, add the address of the bin directory, and separate it with ; before other addresses. As shown in the figure:

5. After the configuration is complete, run cmd as an administrator. The specific steps are as follows:

In the C drive, find cmd.exe in the System32 file in the Windows folder, right-click and run as administrator

**6. First switch the directory to the bin directory of your MySQL installation directory, then enter mysqld in the cmd window

7. Press Enter to run the install. Note: You need to run cmd as an administrator. **

As shown in the figure:

8. Then enter mysqld –initialize-insecure –user=mysql

(After executing the above command, MySQL will create a data folder and a default database. The default username is root and the default password is empty.

9. Start the mysql service:

Enter net start mysql to start the service, OK success

Login/enter mysql database

In the cmd window, enter: mysql -u root –p , press Enter, and when enter password appears, press Enter again. As shown in the figure:

Because no user name and password are set during installation, the default login user name is root and the password is blank.

-u command: used to specify the user name used when connecting to the database.

-p command: used to specify the password entered by the user

Initialization password

When the root user logs in to MySQL,
Enter the following code step by step:

 //Use database use mysql;

//The password is haha, custom update user set authentication_string=PASSWORD("haha") where user="root";

//Update permissions flush privileges; 

//Exit mysql
quit; 

Since I just set a password. Reopen mysql.

At this point, the database password change is complete. Next, we will introduce the common commands of the database.

: : : : : : : : : : : : : : : 
show variables like '%storage_engine%';--View the current default storage engine of MySQL show create table tablename;--View the storage engine used by a table (the "ENGINE=" part of the result) 
alter table tablename ENGINE=InnoDB--Modify the engine create table tablename(fieldname1 fieldtype1,fieldname2 fieldtype2,..) ENGINE=engine_name;--Set the storage engine when creating a table

Wonderful topic sharing: Installation tutorials for different versions of MySQL Installation tutorials for MySQL 5.7 versions Installation tutorials for MySQL 5.6 versions

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:
  • Tutorial on installing and changing the root password of MySQL 5.7.20 decompressed version
  • mysql5.7.20 installation and configuration method graphic tutorial (mac)
  • Detailed tutorial on installing MySQL 5.7.20 on RedHat 6.5/CentOS 6.5
  • MySQL 5.7.18 winx64 installation and configuration method graphic tutorial
  • MySQL 5.7.18 free installation version configuration tutorial
  • Tutorial on installing mysql5.7.18 on windows10
  • MySQL 5.7 and above version installation and configuration method graphic tutorial (mysql 5.7.12\mysql 5.7.13\mysql 5.7.14)
  • MySql 5.7.14 service did not report any error solution (recommended)
  • MySQL 5.7.14 installation and configuration method graphic tutorial
  • MySQL 5.7.20 installation and configuration method graphic tutorial under Windows

<<:  WeChat applet learning wxs usage tutorial

>>:  How to use CSS custom variables in Vue

Recommend

Vue realizes screen adaptation of large screen pages

This article shares the specific code of Vue to a...

How to use webSocket to update real-time weather in Vue

Table of contents Preface About webSocket operati...

Analysis of the reasons why MySQL field definitions should not use null

Why is NULL so often used? (1) Java's null Nu...

Error mysql Table 'performance_schema...Solution

The test environment is set up with a mariadb 5.7...

Detailed explanation of three ways to import CSS files

There are three ways to introduce CSS: inline sty...

Graphic tutorial on installing Ubuntu 18.04 on VMware 15 virtual machine

In the past few years, I have been moving back an...

How to remove the blue box that appears when the image is used as a hyperlink

I recently used Dreamweaver to make a product pres...

Linux kernel device driver Linux kernel basic notes summary

1. Linux kernel driver module mechanism Static lo...

Testing of hyperlink opening target

The target attribute of a link determines where th...

Learn MySQL database in one hour (Zhang Guo)

Table of contents 1. Database Overview 1.1 Develo...

js to achieve the effect of light switch

This article example shares the specific code of ...

Tutorial on installing Android Studio on Ubuntu 19 and below

Based on past experience, taking notes after comp...

Some questions about hyperlinks

I am very happy to attend this episode of potato ...