Get the App
SLTechnology News&Howtos  ›  Database  › 

Mysql 8.0.11 installation and configuration method graphic text tutorial (win10)

Shulou Source: shulou.com Published: 2022-06-01 03:07:26 09月16日 Update

This article records the installation and configuration of mysql 8.0.11 for your reference. The details are as follows.

1. MySQL installation

1.1 download the Windows version of the MySQL installation package on the MySQL official website

Download address

Click to download Download and the following interface will pop up. Click No thanks, just start my download

1.2 after downloading, extract the zip package to the directory you want to install. I will put the unzipped folder under D:\ MySQL.

1.3 configure environment variables:

Enter computer-Advanced system Settings-Advanced-Environment variables

Add the path of mysql decompression

1.4 next configure the configuration file for MySQL

Open the folder D:\ MySQL\ mysql-8.0.11-winx64 that you just extracted, create a configuration file as my.ini, and edit the following basic information about my.ini configuration:

[mysql] default-character-set= UTF8 [mysqld] port = 3306basedir=D:\ MySQL\ mysql-8.0.11-winx64datadir=D:\ MySQL\ mysql-8.0.11-winx64\ datacharacter-set-server=utf8default-storage-engine=INNODB

Next, let's start the MySQL database:

Open the cmd command line tool as an administrator and change directories:

D:

Cd D:\ MySQL\ mysql-8.0.11-winx64\ bin

Enter the initialization command:

Mysqld-initialize-insecure-user=mysql

Generate the data directory under the D:\ MySQL\ mysql-8.0.11-winx64\ bin directory

Start and enter the following command:

Net start mysql

This proves that the connection has been successful.

If an unable to start error occurs, it is as follows:

The reason may be that you have opened another database and the port is occupied.

First open the Control Panel-system Security-Management tools

Pop up the management tools interface and click Service

The service page pops up, as shown in the figure

You can see that MySQL80 is started, but mysql is not started. MySQL80 is a network service MySQL database installed through the MySQL installer client, and both local and network are enabled at the same time.

When you want to use the locally created mysql, you should first close MySQL80, the network service database. There are two ways to close it.

1) right-click MySQL80 and click stop

2) enter the following command on the command side:

Net stop MySQL80

Then enter

Net start mysql

It can start normally.

2. MySQL reset password

2.1 Log in to mysql

Enter:

Mysql-u root-p

Because the password has not been set before, the password is empty, so you can enter directly:

2.2 query user password:

Query user password command:

Mysql > select host,user,authentication_string from mysql.user

Host: ip that allows users to log in

User: the user name of the current database

Authentication_string: user password

If it is empty, the root line should be empty.

2.3 set (or modify) the root user password:

Note: the password field and the password () function have been discarded after mysql 5.7.9

The password must not be taken in the following form:

Use mysql; update user set authentication_string= "newpassword" where user= "root"

This sets the newpassword value under the authentication_string field of the root user in the user table

The steps to correctly change the root password are:

1) if there is content under the authentication_string field of the current root user, set it to empty first, and skip to step 2 if not.

Use mysql; update user set authentication_string='' where user='root'

2) use ALTER to modify the root user password by

Use mysql;ALTER user 'root'@'localhost' IDENTIFIED BY' New password; FLUSH PRIVILEGES

At this point, the local MySQL created by yourself has been created!

Just reconnect!

Wonderful topic sharing:

Installation tutorials for different versions of mysql

Installation tutorials for each version of mysql5.7

Installation tutorials for each version of mysql5.6

Installation tutorials for each version of mysql8.0

The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.

Tags: Password user configuration command data database version input tutorial file directory service method content field tool network management different advanced Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Redmi OPPO Reno Huawei Apple