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 the decompressed version in mysql 5.7.21

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

Share

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

This article mainly introduces mysql 5.7.21 decompression version how to install configuration, the text is very detailed, has a certain reference value, interested friends must read!

1. First of all, now MySQL decompression version, download address https://www.mysql.com/downloads/;

2. Extract the installation package, choose the path according to your preferences, I chose the path E:\Java\Java\MySQL, so the complete path is E:\Java\Java\MySQL\mysql-5.7.21-winx64

3. Configure environment variables

Added system environment variables:

Key Name: MYSQL_HOME

E:\Java\MySQL\mysql-5.7.21-winx64

Add: %MYSQL_HOME%\bin to Path, note that the ";" symbol between different values in Path cannot be omitted

4. Prepare my.ini file, you can first create a new my.txt file, and then rename the file suffix to.ini, the previous version may exist after decompression my-default.ini file, but version 5.7.21 does not, so you have to manually create the file, the contents of the file are as follows:

[mysql] #Set mysql client default character set default-character-set=utf8 [mysqld] #Set port 3306 port = 3306 #Set mysql installation directory basedir=E:\Java\Java\MySQL\mysql-5.7.21-winx64 #Set mysql database data directory datadir=E:\Java\MySQL\mysql-5.7.21-winx64\data #Maximum connections allowed max_connections=200 #Character set used by server defaults to 8-bit encoded latin1 character-set-server=utf8 #Default storage engine to be used when creating new tables default-storage-engine=INNODB

Put the edited my.ini file in E:\Java\java\MySQL\mysql-5.7.21-winx64 directory

5. Open cmd command window as administrator and switch directory to bin directory of MySQL installation directory

6. Execute the following statement to install MySQL

mysqld -install

Service successfully installed. Indicates successful installation

7. Execute the following statement to initialize MySQL

mysqld --initialize-insecure --user=mysql

Executing the command will generate the data directory in MySQL's installation directory and create the root user.

8. Execute the following command to start the mysql service

net start mysql

After execution, there will be the following prompt:

MySQL service is starting..

MySQL service started successfully.

9. After MySQL is started, the root user password is empty, set the password, the command is as follows:

mysqladmin -u root -p password New password

Enter password: old password

When you need to enter the old password, because the old password is empty, you can enter it directly.

The above is "mysql 5.7.21 decompression version how to install configuration" all the content of this article, thank you for reading! Hope to share the content to help everyone, more relevant knowledge, welcome to pay attention to 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