Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Mysql 8.0.13 unzipped version installation and configuration method graphic text tutorial

2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

I. installation

1. Download mysql

Download address: link address

After the browser opens the web page, download the compressed package as shown in the figure

After downloading, extract the package and customize the location, such as: d:\ Developer\ mysql-8.0.13-winx64

2. Configuration file

The mysql8 version does not have a default my.ini file and needs to be created manually. The file is built in the extracted root directory, such as: d:\ Developer\ mysql-8.0.13-winx64

The contents of the file are as follows:

[mysqld] # set port 3306 port=3306# set mysql installation directory basedir=D:\\ Developer\\ mysql-8.0.13-winx64# set the data storage directory of the mysql database datadir=D:\ Developer\ mysql-8.0.13-winx64\ data# allow the maximum number of connections max_connections=200# the number of failed connections the character set used by the max_connect_errors=10# server defaults to UTF8character-set-server=utf8# creation The default storage engine default-storage-engine=INNODB# that will be used for the new table uses the "mysql_native_password" plug-in authentication # mysql_native_passworddefault_authentication_plugin=mysql_native_ password [MySQL] # set mysql client default character set default-character-set=utf8 [client] # sets the default port port=3306default-character-set=utf8 when the mysql client connects to the server

3. Database installation

3.1. Enter the bin directory

Open cmd with administrator privileges (Note: you must install with administrator privileges, or there will be a problem. ), and then go to the bin directory of the mysql installation directory, as shown in the figure

3.2. Initialization

Then enter the mysqld-- initialize-- console command to initialize, and the interface shown in the figure will appear.

The red circle in the picture above is the root account and password, which is automatically generated by mysql without spaces. Users who log in to root for the first time need to use it, so they must remember it. If you don't remember, you need to delete the data under the mysql installation directory data and reinitialize it.

3.3. Execute installation command

After initialization, execute the mysqld-install [service name] command (where the service name can be left unwritten, and the default service name is mysql), and install the mysql service, as shown in the following figure:

If the installation is successful, enter net start mysql to start the service and net stop mysql to stop the service.

4. Change the password of root account

Using automatically generated passwords can sometimes be very unimpressive, and when you use a connection tool (such as navicate) to connect to mysql, you may report that the password has expired and cannot be connected, as shown in the figure

Therefore, it is best to change the password of your root account after the installation is completed and the service is started.

First, mysql-u root-p, log in to the root account using the password generated by mysql, as shown in the figure

Then enter the following command to view user information

Select host,user,authentication_string from mysql.user

If there is something under the authentication_string field of the root user, set it to empty first

Update user set authentication_string='' where user='root'

Finally, enter the following command to change the password, and after the modification is completed, log in again with the password.

Alter user 'root'@'localhost' identified by' New password

After re-login, you can do operations such as creating new users for local or remote development.

Create user command

CREATE USER 'xxx'@'localhost' IDENTIFIED WITH mysql_native_password BY' xxxxx'

If it is a remote connection, you can modify the localhost.

Note: you cannot use the SET PASSWORD = PASSWORD ('xxxx'); command to change the password, and MySQL8 uses the new password authentication plug-in, abandoning "mysql_native_password" and using "caching_sha2_password" instead.

5. Pay attention to the problem

If you are using the graph line client to connect to the root user Times password of mysql, use the command

Select host,user,authentication_string,plugin from mysql.user

Check whether the encrypted plugin of root is caching_sha2_password. If it is this plug-in, you only need to modify the root password at this time, as follows:

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY' New password

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report