MySQL 5.7.20 zip installation tutorial

MySQL 5.7.20 zip installation tutorial

MySQL 5.7.20 zip installation, the specific contents are as follows

(1) Unzip the compressed package and create the data folder and my.ini file.

The directory I unzipped is D:/software/mysql-5.7.21-winx64.

Create a data directory and create or modify the my.ini configuration file.

The zip file I downloaded also did not include a my.ini or default.ini, so I had to create a configuration file manually.

Below is the configuration file I copied from the Internet. It works after personal testing. You only need to change datadir and basedir

[client]
 port=3306
 default-character-set=utf8
 [mysqld]
 #Set the installation directory of mysql basedir = D:/software/mysql-5.7.21-winx64
 #Set mysql data directory datadir = D:/software/mysql-5.7.21-winx64/data
 character_set_server=utf8
 sql_mode=NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER
  # Enable query cache explicit_defaults_for_timestamp=true
 skip-grant-tables

(2) Configure environment variables (bin) Add D:\software\mysql-5.7.21-winx64 to the path

(3)mysqld --initialize --user=mysql --console cmd uses administrator privileges

The last line is a randomly generated password

(4)mysqld --install installation service //A prompt will appear if the installation is successful

(5) Start the MySQL service

 net start mysql

(6) Change (set, or set password if there is no initial password) password. There are many methods available online, but this is the only one I have tried successfully.

set password for 'root' @'localhost' = password('password');

Possible installation problems:

1.mysqld: Can't create directory 'D: oftware\mysql-5.7.21-winx64\data\' (Errcode: 2 - No such file or directory)

Changing the "\" in the basedir and datadir paths in my.ini to "/" can solve this problem.

2. ERROR 2003<HY000>: Can't reach MySQL server on 'localhost'(10061) or something similar. It means that the MySQL service is not started

For solutions to mysql error, click to view: Solutions to ERROR 2003 (HY000) when starting mysql

3. mysqld install reports an error: Install/Remove of the Service Denied

Solution: Just start cmd with administrator privileges

4. Error when logging in: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

The password may be entered incorrectly.

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:
  • 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.16 installation and configuration method graphic tutorial
  • Tutorial on installing the green version of mysql-5.7.16-winx64 on 64-bit win10 system
  • MySQL 5.7.16 green version installation tutorial detailed explanation
  • MySQL 5.7.18 winx64 installation and configuration method graphic tutorial
  • MySQL 5.7.18 free installation version configuration tutorial
  • Solution to the problem that the entry cannot be found when installing mysql5.7.18
  • 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 installation and configuration method graphic tutorial

<<:  How to install Oracle on Windows Server 2016

>>:  How to use macros in JavaScript

Recommend

js to implement a simple bullet screen system

This article shares the specific code of native j...

Example of how to implement keepalived+nginx high availability

1. Introduction to keepalived Keepalived was orig...

Markup validation for doctype

But recently I found that using this method will c...

js canvas realizes random particle effects

This article example shares the specific code of ...

Do you know the meaning of special symbols in URL?

1.# # represents a location in a web page. The ch...

Why does MySQL database index choose to use B+ tree?

Before further analyzing why MySQL database index...

How to configure two-way certificate verification on nginx proxy server

Generate a certificate chain Use the script to ge...

MySQL database query performance optimization strategy

Optimize queries Use the Explain statement to ana...

How to handle super large form examples with Vue+ElementUI

Recently, due to business adjustments in the comp...

How to install mysql via yum on centos7

1. Check whether MySQL is installed yum list inst...

MySQL 8.0.11 installation tutorial with pictures and text

There are many tutorials on the Internet, and the...

Display and hide HTML elements through display or visibility

Sometimes we need to control whether HTML elements...

Docker sets up port mapping, but cannot access the solution

#docker ps check, all ports are mapped CONTAINER ...

How to set the height of the autosize textarea in Element UI

After setting textarea input in Element UI to aut...