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 mysql 5.7.27 in winx64 system

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

Share

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

This article will explain in detail how to install mysql 5.7.27 in the winx64 system, the content of the article is of high quality, so the editor will share it with you for reference. I hope you will have some understanding of the relevant knowledge after reading this article.

1. First download mysql from the official website

two。 Go to the mysql-5.7.27-winx64 directory, create a new txt file, and rename it to my.ini, which is a configuration file. As shown in the figure:

3. Open the my.ini file and configure it with the following code (just paste and copy the code, but be careful to change the location of the file! )

Here we use INNODB as the database engine, the maximum number of connections is 200, the encoding is set to utf8, and the location of the line is changed to its own storage location. Remember to save the file after pasting the code!

4. Configure environment variables

Find: my computer-Properties-Advanced Environment Settings-Environment variables-system Environment. Create a new system environment variable

The variable name and value are: MYSQL_HOME storage location as shown in the figure: (here is the file location of my mysql storage)

Then click Path,- edit in the system variable and add it later; the configuration here is separated by a semicolon.% MYSQL_HOME%\ bin.

5. Start installing mysql

First open cmd and run it as an administrator

Then change to the bin directory under the mysql file, as shown in the figure. Just switch according to the file path at one level.

Start installing mysql

Follow the cmd command line above, enter the command mysqld-- install, and then Enter

If you have installed MySQL before, you will be prompted that you have installed mysql. In this case, you need to shut down the mysql server, switch back to disk c, and then execute the command net stop mysql.

Then change back to the bin directory of Mysql and use the command to delete the previously installed mysql

Delete command is mysqld-- remove

After deletion, execute mysqld-- install to install

6. Generate a data directory to store data that will later use the mysql database

The command is: mysqld-- initialize

At this point, when you open the previous MySQL directory, you will find that there is an extra data file, as follows:

7. Use the following command to skip the mysql password

Then enter the command mysqld-- skip-grant-tables above

At this point, the cmd command line will output nothing and can no longer be typed, so we open another cmd again and run cmd with administrator privileges. Note: at this point, you need to make sure that the mysql server is running properly, use the following command to run the mysql server net start mysql

In the newly opened cmd, change to the bin directory of mysql, and enter the command mysql-u root-p

At this point, the system will prompt you to enter the password, because we have used the mysqld-- skip-grant-tables command before, so we will skip the password and press enter to proceed to the next step. Congratulations, you have already installed mysql. If there is a problem during the installation process, please consider these aspects: whether the mysql server is turned on, whether you switch to the corresponding file directory, whether there is something wrong with the configuration file, and so on.

On how to install mysql 5.7.27 in the winx64 system to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

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