MySQL 5.7.27 winx64 installation and configuration method graphic tutorial

MySQL 5.7.27 winx64 installation and configuration method graphic tutorial

This article shares the installation and configuration method of MySQL 5.7.27 winx64 for your reference. The specific content is as follows

1. First download mysql from the official website . The version I downloaded here is mysql-5.7.27-winx64. When you just downloaded it, it was a MySQL compressed package, namely mysql-5.7.27-winx64.zip. Just unzip it to the current directory.

The path on my computer is: D:\mysql

2. Enter the mysql-5.7.27-winx64 directory, create a new txt file, and rename it to my.ini, which is a configuration file. As shown in the figure:

3. Open the my.ini file and configure it with the following code (just copy and paste the code, but pay attention to the location of the file!)

Here we use INNODB as the database engine, the maximum number of connections is 200, the encoding is set to utf8, and the position of the line can be changed to your own storage location. Remember to save the file after pasting the code!

4. Configure environment variables

Find: My Computer - Properties - Advanced Environment Settings - Environment Variables - System Environment. Create a new system environment variable.
The variable name and value are: MYSQL_HOME The storage location is as shown in the figure: (Here is the file location where my mysql is stored)

Then click on the Path in the system variables, -Edit, and add at the end; %MYSQL_HOME%\bin The configuration here is separated by semicolons.

5. Start installing mysql

First open cmd, run it as an administrator, and then switch to the bin directory under the mysql file, as shown in the figure, and switch level by level according to the file path.

Start installing mysql

Next, enter the command mysqld --install and press Enter. If you have installed MySQL before, the system will prompt you that MySQL has been installed. At this time, you need to shut down the MySQL server first. You need to switch back to the C drive and then execute the command net stop mysql.
Then switch back to the MySQL bin directory and use the command to delete the previously installed MySQL
The removal command is mysqld --remove
After deleting, execute mysqld --install to install

6. Generate a data directory to store data for future use in the MySQL database

The command is: mysqld --initialize
At this time, when you open the previous MySQL directory, you will find an additional data file, as follows:

7. Skip the mysql password using the following command

Then enter the command mysqld --skip-grant-tables above
At this time, the cmd command line will not output anything and no input can be done. We open another cmd again and run it with administrator privileges. Note: At this time, you need to ensure that the MySQL server is running normally. Use the following command to run the MySQL server net start mysql
In the newly opened cmd, switch to the bin directory of mysql, and then enter the command mysql -u root -p
You will be prompted to enter a password. Since we have used the mysqld --skip-grant-tables command before, we will skip the password. Just press Enter to proceed to the next step.

8. Set a password

Just set the password you want. Here I use 123456
Enter the following command update mysql.user set authentication_string=password(“123456”) where user=“root”;
Then use the following command to refresh mysql flush privileges
At this point, the operation has been completed. Close all cmd command lines.

9. Check whether mysql is installed

Open the cmd command line as an administrator and switch to the bin path under MySQL. Remember to ensure that your MySQL service is running normally at this time.
Then enter the command mysql -u root -p
The system will prompt you to enter a password. Just enter the password you set last time. If the prompt of the cmd command line has changed from the bin directory under mysql to mysql>, congratulations, you have installed mysql. If problems occur during the installation process, please consider the following aspects: whether the MySQL server is turned on; whether the corresponding file directory is switched to; whether there is a problem with the configuration file, etc.

Wonderful topic sharing:

MySQL different versions installation tutorial

MySQL 5.7 installation tutorials for various versions

MySQL 5.6 installation tutorials for various versions

mysql8.0 installation tutorials for various 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:
  • MySQL 5.7.25 installation and configuration method graphic tutorial
  • MySQL 5.7.27 installation and configuration method graphic tutorial
  • Win32 MySQL 5.7.27 installation and configuration method graphic tutorial
  • MySQL 5.7.27 installation and configuration method graphic tutorial
  • MySql 5.7.20 installation and configuration of data and my.ini files
  • Detailed steps to install MySql 5.7.21 in Linux
  • Detailed tutorial for installing mysql5.7.21 under Windows system
  • MySQL 5.7.20 Green Edition Installation Detailed Graphic Tutorial
  • MySQL 5.7.20 installation and configuration method graphic tutorial under Windows
  • MySQL 5.7.25 compressed version installation and configuration method graphic tutorial

<<:  Detailed steps for building a React application with a Rails API

>>:  Summary of common Linux distribution mirror source configuration

Recommend

Vue implements an example of pulling down and scrolling to load data

Table of contents Step 1: Installation Step 2: Ci...

A brief introduction to VUE uni-app basic components

1. scroll-view When using vertical scrolling, you...

Install multiple versions of PHP for Nginx on Linux

When we install and configure the server LNPM env...

Problems and solutions encountered when connecting node to mysql database

I installed a new version of MySQL (8.0.21) today...

VMware Workstation 12 Pro Linux installation tutorial

This article records the VMware Workstation 12 Pr...

Set the width of the table to be fixed so that it does not change with the text

After setting the table width in the page to width...

HTML+CSS+JS to implement the Don't Step on the Whiteboard game

Table of contents Background 1. Thought Analysis ...

Implementing shopping cart function based on vuex

This article example shares the specific code of ...

How to use resize to implement image switching preview function

Key Points The CSS resize property allows you to ...

Linux editing start, stop and restart springboot jar package script example

Preface In the springboot configuration file, the...

Summary of common functions and usage methods of WeChat applet development

Here, I have mainly sorted out some commonly used...

Solution to Incorrect string value in MySQL

Many friends will report the following error when...

MySQL query syntax summary

Preface: This article mainly introduces the query...

Detailed example of how to implement transaction commit and rollback in mysql

Recently, we need to perform a scheduled migratio...