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

How to install and configure mysql8.0.2 offline

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

Share

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

This article mainly shows you "how to install mysql8.0.2 offline configuration", 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 "how to install mysql8.0.2 offline configuration" this article.

The following package is obtained from the official website of MySQL:

After decompression, it looks like this:

The file looks like this:

Here we go. Please pay attention.

First big step: configure the my.ini file

The contents are as follows:

[mysql] # set mysql client default character set default-character-set=utf8 [mysqld] # set port 3306 port = 3306 # set mysql installation directory If you mistakenly use the backslash basedir=D:\\ tools\\ mysql-8.0.2-dmr-winx64# to set the data storage directory of the mysql database datadir=D:\\ tools\\ mysql-8.0.2-dmr-winx64\\ dataskip-grant-tables# allows the maximum number of connections the character set used by the max_connections=200# server defaults to the 8-bit encoded latin1 character set character-set-server=utf8# the default storage engine default-storage-engine=INNODB that will be used when creating new tables

Copy the above into notepad, then rename it to my.ini, and move it to the MySQL installation directory.

Pay attention to two points

1. Everyone's installation directory is different, so you can change the installation directory and the data storage directory accordingly.

The'\'in 2.basedir=D:\\ tools\\ mysql-8.0.2-dmr-winx64 must not be written as''.

Second step: configure MySQL environment variables

1.Win+R, enter sysdm.cpl, as shown in the figure:

two。 Enter appears, as shown in the figure:

3. Click Advanced-> Environment variable (N). As shown in the figure:

4. Continue as shown below:

5. Continue as shown below:

6. Continue as shown below:

7. Still continue as shown in the picture:

Finally, the application can be determined.

Second step: create a data folder

Enter the command line as an administrator and go to the bin folder under mysql-8.0.2-dmr-winx64, as shown below:

Then type: mysqld-initialize-insecure, wait about 40 seconds.

Then the data directory appears under the mysql-8.0.2-dmr-winx64 folder:

Then type mysqld-install and enter enter.

Then, start the database service: net start mysql, and show the following figure:

The third step: set the password

After entering the mysql environment, enter:

Update mysql.user set authentication_string = password ('password you are going to set') where user = 'user name'

For example: update mysql.user set authentication_string = password ('147258369') where user =' root'

Then, enter flush privileges; for immediate effect.

Then type quit to exit the MySQL environment and restart it.

Step 4: log in to the database

Log in to the database with administrator privileges and enter mysql-u user name-p

For example: mysql-u root-p

Enter the password you set earlier and enter.

The above is all the contents of the article "how to install and configure mysql8.0.2 offline". 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

Database

Wechat

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

12
Report