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

Two ways to implement HTML to randomly drag content positions

Test: Chrome v80.0.3987.122 is normal There are t...

Vue uses rules to implement form field validation

There are many ways to write and validate form fi...

Vue implements accordion effect

This article example shares the specific code of ...

Simple writing of MYSQL stored procedures and functions

What is a stored procedure Simply put, it is a se...

How to run top command in batch mode

top command is the best command that everyone is ...

Steps for packaging and configuring SVG components in Vue projects

I just joined a new company recently. After getti...

Detailed explanation of CSS line-height and height

Recently, when I was working on CSS interfaces, I...

Pure CSS drop-down menu

Achieve results Implementation Code html <div ...

Install tomcat and deploy the website under Linux (recommended)

Install jdk: Oracle official download https://www...

Example of using nested html pages (frameset usage)

Copy code The code is as follows: <!DOCTYPE ht...

Vue component library ElementUI realizes the paging effect of table list

ElementUI implements the table list paging effect...

Understand the principle of page replacement algorithm through code examples

Page replacement algorithm: The essence is to mak...