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 installation and reset password problem

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

Mysql 8.0 installation problems and password reset

1: download MySql

Download address on the official website: https://dev.mysql.com/downloads/mysql/

2: install MySql

Open the download file and extract it to the specified file directory.

Open the extracted MySql file to create a my.ini (mysql configuration file) in the root directory and create it using nodpad++c

Here, you need to change the paths of basedir and datadir to the decompression path of mysql.

[mysql] # set mysql client default character set default-character-set=utf8 [mysqld] # set port 3306 port = 330 setting mysql installation directory basedir=C:\ Program Files\ Java\ mysql-8.0.12-winx64\ mysql-8.0.12-winx64# set mysql database data storage directory datadir=C:\ Program Files\ Java\ mysql-8.0.12-winx64\ mysql-8.0.12-winx64\ datadir# allows the most The character set used by the Dalian connection max_connections=200# server defaults to the 8-bit encoded latin1 character set character-set-server=utf8# the default storage engine default-storage-engine=INNODBskip-grant-tables that will be used when creating new tables

Locate the CMD command prompt

Enter the MySQL subdirectory bin

Enter: mysqld-- install (installation)

Mysqld-initialize (initialize) net start mysql (run)

I have completed the installation here, this machine is Apple win7, there is only one C disk, so it can only be installed in the C path.

3: change the password

Because you downloaded the latest version of mysql 8.0, it comes with your own password and must be reset when you use it.

Enter mysql with administrator privileges and the system requires a password.

The original password is in the .err file in C:\ Program Files\ Java\ mysql-8.0.12-winx64\ mysql-8.0.12-winx64\ data.

Open .err, and the password is on this line of the file.

Enter the password into enter password in cmd.

Error will be reported when using the test

Insert command to change password

Alter user 'root'@'localhost' identified with mysql_native_password by' your password

Prompt Query OK

The test uses the database:

Note that the database statement must end with a semicolon, otherwise it will not be executed and will continue to appear->.

Summary

The above is the Mysql 8.0 installation and reset password problem introduced to you by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply you in time!

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