Install MySQL 5.7.17 in win10 system

Install MySQL 5.7.17 in win10 system

Operating system win10 MySQL is the 64-bit zip decompressed Community version downloaded from the official website.

Because I wanted to install Mysql on the company computer, I downloaded the latest version of Mysql-5.7.17 from the official website. First, I installed it according to the online tutorial, unzipped it, and then created a new Mysql0104 directory on the C drive (as the installation directory for Mysql), and copied the contents of the unzipped Mysql-5.7.17 folder to the installation directory Mysql.

The file contents are as follows:

Then follow the online guide: run the command line window as an administrator, and install mysql using mysqld -install; theoretically there should be no problem with this step and the installation should be normal. It will give feedback that the installation is successful (I forgot to take a screenshot of this step)

To avoid unsuccessful subsequent installation, set up the configuration file first. Right-click on the MyPC computer, select Properties, click to enter and select Advanced System settings, click to enter and select Environment Variables, select the System variables selected in the red box in the figure below, New to add a system variable MYSQL_HOME, the value is the installation path of MySQL, on my computer the value is: C:\mysql0104, then click Path (generally there will be PATH on the computer, if not, create it yourself), then copy and paste the string of values ​​;%MYSQL_HOME%\bin, and the environment variable will be configured, as shown in the figure below.



Next, you need to install and configure MySQL, which is different from the old version. Because there is no data file under the mysql0104 folder, we need the system to generate it.

So run the command line window as administrator. Use the cd command to switch directories and make sure the directory is under the bin directory (there may be errors under the system directory, but I have not tried it). Enter the command in the bin directory: mysqld --initialize

There is also a saying on the Internet that enter the command: mysqld --initialize -insecure I have tried both methods, and both generate a data folder with an empty password. (There are also some sayings on the Internet that a string of passwords will be generated through mysql-console and need to be written down. It seems very complicated, so I don’t need to pay attention to it. Just follow the instructions above)

I have made several mistakes in this step. If you make a mistake, just delete the data folder. Then run this line of code again. However, if there is a data folder, running the above initialization command will definitely result in an error.

Initialization is very important. After executing the initialization command, the following files are newly generated in the empty data directory:

Some people on the Internet say that you can copy the data files in the old version of MySQL to the installation directory, so there is no need to generate the system. However, I have seen many people say that this method will cause many problems, so it is not recommended. After all, different versions of updates should have some differences in the contents of the data folder.

Then there is a step to start the mysql service, that is, net start mysql. Theoretically, it should start successfully, but I keep getting errors. And it was an error for unknown reasons. I struggled with this step for a long time, but later I found that in fact, I didn’t need to care about the feedback of this command at all, because as long as the database could operate normally, there would be no problem with anything else.

Don't worry about it, let's check whether our mysql is actually installed successfully:

Enter in the command line: mysql -uroot進入數據庫(assuming the password has not been modified and is still empty)

Look, the system feedback shows that we have successfully logged into the database. After that, we can operate through some commands, such as: show databases; create test; use test; and so on. Remember to add a semicolon before you can operate, and be sure to add a semicolon at the end! !

Then you can create tables, query, insert and delete in the database normally, and the MySQL environment is installed.

The above is the graphic tutorial for installing Mysql 5.7.17 under win10 system introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!

You may also be interested in:
  • Installation tutorial of MySQL 5.7.17 zip package version under win10
  • Mysql 5.7.17 winx64 free installation version, installation and configuration graphic tutorial under win10 environment
  • Tutorial on installing the green version of mysql-5.7.16-winx64 on 64-bit win10 system
  • How to install MySQL 5.7.11 on 64-bit Win10 system (case study)
  • MySQL 5.6 decompressed version installation and configuration method graphic tutorial (win10)
  • MySQL 5.7.13 installation and configuration method graphic tutorial (win10)

<<:  Linux server SSH cracking prevention method (recommended)

>>:  Problems and solutions encountered when installing mininet on Ubuntu 16.04.4LTS

Recommend

Analysis of idea compiler vue indentation error problem scenario

Project scenario: When running the Vue project, t...

How to get the contents of .txt file through FileReader in JS

Table of contents JS obtains the .txt file conten...

How to clear the cache after using keep-alive in vue

What is keepalive? In normal development, some co...

How to use environment variables in nginx configuration file

Preface Nginx is an HTTP server designed for perf...

Detailed explanation of viewing and setting SQL Mode in MySQL

Viewing and Setting SQL Mode in MySQL MySQL can r...

React event mechanism source code analysis

Table of contents Principle Source code analysis ...

Specific method to add foreign key constraints in mysql

The operating environment of this tutorial: Windo...

How to run JavaScript in Jupyter Notebook

Later, I also added how to use Jupyter Notebook i...

How to install MySQL and MariaDB in Docker

Relationship between MySQL and MariaDB MariaDB da...

MySQL installation and configuration methods and precautions under Windows platform

2.1、msi installation package 2.1.1、Installation I...