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

Example Analysis of installation and configuration of mysql5.7.21 decompressed Edition

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

Share

Shulou(Shulou.com)05/31 Report--

This article mainly shows you the "mysql5.7.21 unzipped version of the installation and configuration of the sample analysis", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn the "mysql5.7.21 unzipped version of the installation and configuration example analysis" of this article.

1. Download MYSQL compressed files on the official website.

Download URL

two。 Extract the file

Decompress directly, and install the package directory as follows: (note: there are no data directories and .Ini files at this time)

3. Put the files in the directory you want to put. Here is the directory I put.

4. Because there is no .ini file after decompression, create a new my.ini file in this directory

The .Ini file is as follows:

[mysqld] port = 3306basedir=C:\ Program Files\ MYSQL\ MySQL Server 5.7.21datadir=C:\ Program Files\ MYSQL\ MySQL Server 5.7.21\ data max_connections=200character-set-server=utf8default-storage-engine=INNODBsql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_ tables [MySQL] default-character-set=utf8

Pay attention to two things:

This path is the path you put in step 3.

5. Configure environment variables

Open the control panel and select Advanced system Settings

Select Advanced in the pop-up tab, and then select Environment variable

Create a new "MYSQL_HOME" value "C:\ Program Files\ MYSQL\ MySQL Server 5.7.21" in the system variable (the path stored in step 3)

6. MYSQL installation

"Microsoft key + Q" opens the search CMD

Run the Command prompt as an administrator.

Enter the MYSQL directory cd C:\ Program Files\ MYSQL\ MySQL Server 5.7.21\ bin

Run mysqld-- initialize

Run mysqld-install

Run the net start mysql startup service

7. Set Root account password

Modify the configuration file (my.ini) of MySQL and add a line skip-grant-tables under [mysqld]

After mysql is restarted, you can directly use mysql-u root-p to enter (password is empty)

Enter update mysql.user set authentication_string=password ("root") where user= "root"

Enter flush privileges

Enter quit

Restore the my.ini file (delete the line skip-grant-tables) and restart mysql

At this time, you can use mysql-u root-p root to enter

Note:

The following errors may be encountered during installation:

The MySQL service could not be started.

The service did not report any errors.

Please type NET HELPMSG 3534 for more help.

Deal with:

Check if data exists in the MYSQL directory and reinstall it.

Type sc delete mysql to delete the original MYSQL and repeat step 6

The above is all the contents of the article "sample Analysis of installation and configuration of mysql5.7.21 unzipped version". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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

Wechat

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

12
Report