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 installation-free configuration and password modification tutorial

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

Share

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

Step 1: Configure environment variables (my decompression path:G:\mysql\mysql-5.7.21-winx64)

MYSQL_HOME= path you extracted

PATH = ;%MYSQL_HOME %\bin;

PATH variable is added on the basis of the original, do not delete other settings

Step 2: Add my.ini file to the extracted directory (if you already have this file, just replace it)

File content is

[client] port=3306 default-character-set=utf8[mysqld] port=3306 character_set_server=utf8 #extract directory basedir=G:\mysql\mysql-5.7.21-winx64 #extract directory under data directory datadir=G:\mysql\mysql-5.7.21-winx64\data sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES[WinMySQLAdmin] G: \mysql\mysql-5.7.21-winx64\bin\mysqld.exe

Step 3: Run cmd as an administrator, then go to the bin folder under the decompression path, execute mysqld -install command, and then create a new data folder under the decompression path (there is no content inside)

Step 4: Log in

Open cmd as an administrator and type mysql -uroot -p, enter without password (default password is blank)

Step 5: Change password

Stop mysql service with net stop mysql, then add skip-grant-tables to my.ini file

Then start mysql service and modify the authentication_string field value of root user in user table in mysql data source (originally password field, later changed to authentication_string)

After success, delete the skip-grant-tables of my.ini file and you're done.

If an error occurs:

ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

Because the password has expired, you can set it like this

set password = password('mysql');use mysqlupdate user set password_lifetime = 0 where User='root';flush privileges;

summary

The above is a small series to introduce mysql free installation version configuration and password modification tutorial, I hope to help you, if you have any questions please give me a message, small series will reply to you in time. Thank you very much for your support!

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