Summary of common problems in downloading and installing MySQL 5.7 on Win7 64-bit

Summary of common problems in downloading and installing MySQL 5.7 on Win7 64-bit

1. Download MySQL from the official website:

This is what we are looking for, win7 64 bit

Click to download;

As shown in the picture, we don’t need to log in or register, just click within the red line.

2. Installation and configuration:

Then unzip it to the local folder:

Go to the directory, copy the my-default.ini file and rename it to my.ini

Open my.ini for configuration

Code: (Change D:\mysql\mysql-5.6.17-winx64 to your own software path and save)

[mysql]
# Set the default character set of the mysql client to default-character-set=utf8
[mysqld]
#Set port 3306 port = 3306
# Set the installation directory of mysql to basedir=E:\mysql\mysql-5.7.11-winx64
# Set the storage directory of mysql database data datadir=E:\mysql\mysql-5.7.11-winx64\data (the data directory does not exist during installation)
# Maximum number of connections allowed max_connections=200
# The default character set used by the server is the 8-bit latin1 character set character-set-server=utf8
# The default storage engine that will be used when creating a new table default-storage-engine=INNODB

Save and exit;

3. Enter the cmd command line to install mysql (run as an administrator, otherwise it will be inaccessible)

Enter the mysql bin directory

Enter mysqld -install to install

If there is no data file in the mysql directory, initialize it

Enter mysqld –initialize-insecure to automatically generate a root user without a password and create a data folder

Enter mysqld –initialize to automatically generate a root user with a random password.

(Note: This command cannot be executed when the data folder exists. You can delete all folders under the data directory first)

This completes the installation.

Enter net start mysql to start the service, and then you can connect to the database and log in.

In the new version of MySQL 5.7

This problem may occur because the data folder does not exist.

Change the root user password

Method 1: Use the SET PASSWORD command

First log in to MySQL.

Format: mysql> set password for username@localhost = password('new password');

Example:mysql> set password for root@localhost = password('admin10000.com');

The above example changes the password of user root to admin10000.com

Method 2: Using mysqladmin

Format: mysqladmin -u username -p old password password new password

Example: mysqladmin -uroot -p123456 password admin10000.com

The above example changes the original password 123456 of user root to the new password admin10000.com

Method 3: Use UPDATE to edit the user table directly

First log in to MySQL.

mysql> use mysql;
mysql>update user set password=password('admin10000.com')where user='root' and host='localhost';
mysql>flush privileges;

Method 4: When you forget the root password, you can do this.

Take Windows as an example:

1. Shut down the running MySQL service.

2. Open a DOS window and go to the mysql\bin directory.

3. Enter mysqld –skip-grant-tables and press Enter. –skip-grant-tables means skipping the permission table authentication when starting the MySQL service.

4. Open another DOS window (because the previous DOS window cannot be moved), and go to the mysql\bin directory.

5. Type mysql and press Enter. If successful, the MySQL prompt > will appear.

6. Connect to the privilege database: use mysql; .

6. Change password: update user set password=password(“admin10000.com”) where user=”root”; (don’t forget to add a semicolon at the end).

7. Refresh privileges (required step): flush privileges; .

8. Exit quit.

9. Log out of the system, then log back in using the username root and the new password admin10000.com you just set.

The above is a summary of the common problems in downloading and installing Win7 64-bit MySQL 5.7. I hope it will be helpful to you. If you have any questions, please leave me a message and I 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:
  • MySQL 8.0.12 installation and environment variable configuration tutorial under win10
  • MySQL 5.6.23 Installation and Configuration Environment Variables Tutorial
  • How to configure environment variables after installing mysql5.7 database
  • The latest version of MySQL 8.0.22 download and installation super detailed tutorial (Windows 64 bit)
  • MySQL 8.0.22.0 download, installation and configuration method graphic tutorial
  • MySQL 8.0.22 download, installation and configuration method graphic tutorial
  • Detailed tutorial for downloading, installing and configuring MySQL 5.7.27
  • mysql8.0.20 download and installation and problems encountered (illustration and text)
  • MySQL 5.6.37 (zip) download installation configuration graphic tutorial
  • MySQL 5.7.18 Green Edition Download and Installation Tutorial
  • MySQL 8.0.15 download and installation detailed tutorial is a must for novices!
  • MySQL 8.0.13 download and installation tutorial with pictures and text
  • Detailed graphic instructions for downloading and installing the unzipped version of MySQL 5.7.18 and starting the MySQL service
  • MySQL 5.7 Service Download and Installation Graphical Tutorial (Classic Edition)
  • MySQL 5.7.14 download, installation, configuration and use detailed tutorial
  • MySQL msi version download and installation detailed graphic tutorial for beginners

<<:  WeChat applet custom scroll-view example code

>>:  How to add ansible service in alpine image

Recommend

Analysis of problems caused by MySQL case sensitivity

MYSQL is case sensitive Seeing the words is belie...

Javascript closure usage scenario principle detailed

Table of contents 1. Closure 2. Closure usage sce...

How to modify the master-slave replication options in MySQL online

Preface: The most commonly used architecture of M...

CentOS6.8 uses cmake to install MySQL5.7.18

Referring to the online information, I used cmake...

Docker Basics

Preface: Docker is an open source application con...

jQuery implements employee management registration page

This article example shares the specific code of ...

HTML meta viewport attribute description

What is a Viewport Mobile browsers place web page...

Summary of Common Mistakes in Web Design

In the process of designing a web page, designers...

Quick solution for forgetting MySQL8 password

Preface When we forget the MySQL database passwor...

Vue realizes the palace grid rotation lottery

Vue implements the palace grid rotation lottery (...

Detailed explanation of using MySQL where

Table of contents 1. Introduction 2. Main text 2....

CSS3 implementation example of rotating only the background image 180 degrees

1. Mental Journey When I was writing the cockpit ...

JavaScript implements draggable modal box

This article shares the specific code of JavaScri...

Detailed explanation of CSS label mode display property

The code looks like this: <!DOCTYPE html> &...