MySQL 5.7 installation and configuration tutorial

MySQL 5.7 installation and configuration tutorial

This article shares the MySQL installation and configuration tutorial for your reference. The specific contents are as follows

1. Configure MySQL database

1. Unzip the green version of mysql and rename it to mysql5.7, as shown below

Compare the previous versions of Figure 5.6 below, which lack the data directory (storing data) and the my-default.ini file (configuration information)

2. Installation Service

1. Run cmd (administrator version, otherwise no permission), as shown below

2. For the new version of MySQL 5.7, there is no data directory. We need to run the command to create it.

3. Run the command mysqld –install to install the service, as shown below:

If you don’t need mysql, just run mysqld –remove to remove it, as shown below

3. Run net start mysql to start the service, as shown below

If you need to configure whether to start MySQL at boot time, you can configure it in Windows Services.

3. Client Test

1.mysql –uroot –p as shown below

4. Change username and password

1. Run the command

use mysql;

UPDATE user SET authentication_string=password('123456') where user='root';

FLUSH PRIVILEGES;

As shown below:

2. Log in again and run the command mysql -uroot -p123456

5. Configure encoding to UTF-8

1. View the default encoding

2. In the root directory of mysql5.7, create a new my.ini file (this file does not exist after 5.7, create it yourself), as shown below:

When the MySQL service program starts, it will automatically read my.ini to obtain various configuration parameters, including encoding

3. Edit my.ini

Under the [mysqld] node, configure the server encoding and add two items

character_set_server=utf8

[mysql] node, this is to configure the client information

We also add the [mysql] node and configure the encoding to UTF8

[mysql]

default-character-set=utf8

As shown below:

6. Test query

1. After modifying the configuration file, you must restart the service first

2. Log in as root user normally

3. Run the command show variables like "%character%" to view the system character set variables, as shown below:

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

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:
  • Installation and configuration of MySQL 5.6 under Windows with screenshots and detailed instructions
  • MySQL 5.6 (Win7 64-bit) download, installation and configuration graphic tutorial
  • MySQL 5.5 installation and configuration method graphic tutorial
  • MySQL 5.6.17 Green Edition (Free Installation) Installation and Configuration Tutorial
  • MySQL 5.7.16 installation and configuration method graphic tutorial
  • MySQL 5.7.13 installation and configuration method graphic tutorial (linux)
  • Installation and Configuration Tutorial of MySQL 5.6.11 for Windows
  • mysql5.7.19 winx64 decompressed version installation and configuration tutorial
  • MySQL 5.7.19 installation and configuration method graphic tutorial (win10)
  • MySQL 5.7.13 winx64 installation and configuration method graphic tutorial

<<:  jQuery implements time selector

>>:  Detailed explanation of Linux commands and file search

Recommend

Solve the problem when setting the date to 0000-00-00 00:00:00 in MySQL 8.0.13

I just started learning database operations. Toda...

How to manually install MySQL 5.7 on CentOS 7.4

MySQL database is widely used, especially for JAV...

The latest graphic tutorial of mysql 8.0.16 winx64 installation under win10

In order to download this database, it takes a lo...

Design theory: people-oriented green design

Reflections on the two viewpoints of “people-orie...

Vue component organization structure and component registration details

Table of contents 1. Component Organization 2. Co...

CSS code to control the background color of the web page

I think everyone often worries about finding pict...

Summary of various implementation methods of mysql database backup

This article describes various ways to implement ...

Nginx reverse proxy springboot jar package process analysis

The common way to deploy a springboot project to ...

MySQL 5.7.18 installation tutorial and problem summary

MySQL 5.7.18 installation and problem summary. I ...