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

The detailed method of installing and modifying root password of MySQL5.7 in Windows10

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

The following mainly brings you the detailed methods of MySQL5.7 installation and modification of root password in Windows10. I hope these contents can bring you practical use, which is also the main purpose of this article that I edit the detailed method of MySQL5.7 installation and modification of root password in Windows10. All right, don't talk too much nonsense, let's just read the following.

Example: MySQL5.7.19 download

Of course, the first thing is to download the https://dev.mysql.com/downloads/mysql/ official website download address. (related mysql video tutorials)

Choose the version that suits your computer, click Download, jump, and download it directly with No thanks.

Quietly waiting for download, decompression. This is my decompression path D:\ MySQL

Officially start the installation

: Windows10

: MySQL5.7.19

After decompression

However, there is no my.ini to create one, just create a new text document-> suffix and change it to ini.

[Client] # set port 3306 port = 3306 [mysqld] # set port 3306 port = 330mm set your own MySQL installation directory basedir=D:\ MySQL# set your own MySQL database data storage directory datadir=D:\ MySQL\ data# allow maximum number of connections the character set used by the max_connections=200# server defaults to 8-bit encoded latin1 character set character-set-server=utf8# default storage to be used when creating a new table Engine default-storage-engine=INNODBsql_mode=NO_ENGINE_SUBSTITUTION STRICT_TRANS_ tables [MySQL] # sets the client default character set default-character-set=utf8

So the next step is to configure the environment variables, just above.

This computer-> right, Properties-> Advanced system Settings-> Environment variables

Variable name: MYSQL_HOME

Variable value: the installation path of your MySQL

Next, add Path, select Path editor, and add one:% MYSQL_HOME%\ bin

I'm sure all the way.

If you open a command prompt, you must have administrator privileges, otherwise you don't have enough privileges.

Cd / dD:\ MySQL\ bin enter the bin directory. To enter the bin directory! It's not on the picture! Then follow the command in the picture and knock on it.

Next, mysql-u root-p enters MySQL without a password for the first time. Just enter directly. Because I installed it before, I need a password.

Next, update the password

MySQL5.7 no longer has the PASSWORD field, it has been changed to authentication_string

SO:

Mysql > update mysql.user set anthentication_string=password ('your password') where user='root';mysql > flush privileges;// refresh MySQL system permissions mysql > quit

Enter mysql-u root-p again and you can operate it.

Mysql > show databases

Can also be the next MySQL graphical interface, SQLyog, Navicat and so on.

Forget the root password

Maybe the password will be forgotten after a long time.

Look at the picture.

First, net stop mysql stops the service.

If you can't stop:

Ctrl+Alt+Del opens the task manager and ends the mysql.exe task in the details.

Enter the bin directory

Mysqld-nt--skip-grant-tables

Now this command prompt can no longer be used.

Re-open an administrator command prompt and enter mysql to change the password and OK.

For the above on the Windows10 MySQL5.7 installation and modify the root password of the detailed method, we do not feel very helpful. If you need to know more, please continue to follow our industry information. I'm sure you'll like 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