In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail the method of installing version 5.7.21 of mysql. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.
How to install the MySQL5.7.21 version: download the mysql installation package and extract it, then install the configuration environment variables, create a new file to put the my.ini file after configuration, and then install initialization and start the database under the cmd command
The installation method for the MySQL5.7.21 version is as follows
(1) to download the decompressed version of MySQL, download address: https://www.mysql.com/downloads/
(2) extract the installation package and customize the installation path. In this example, C:\ software\ is selected, so the full path of MySQL is: C:\ software\ mysql-5.7.21-winx64.
(3) configure environment variables and add system environment variables:
Key name: MYSQL_HOME
The value is: C:\ software\ mysql-5.7.21-winx64
Add:% MYSQL_HOME%\ bin to Path. Note that the ";" symbol between different values in Path cannot be omitted.
(5) when the my.ini file is ready, you can first create a new my.txt file, and then rename the file with the suffix .ini. The my-default.ini file may exist after decompression in the previous version, but not in version 5.7.21, so you need to create the file manually, as shown below:
[mysqld] port = 3306basedir=C:/software/mysql-5.7.21-winx64datadir=C:/software/mysql-5.7.21-winx64/data max_connections=200character-set-server=utf8default-storage-engine=INNODBsql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_ tables [MySQL] default-character-set=utf8
Note that the installation path of MySQL is in the red box, and use "/" instead of "\" between folders, otherwise errors may occur in the following operations
After editing the my.ini file, place the my.ini file in the C:\ software\ mysql-5.7.21-winx64 directory
(5) Open the cmd command window as an administrator and change the directory to the bin directory of the installation directory of MySQL
(6) execute the following statement to install MySQL
Mysqld-install
Prompt after executing the command: Service successfully installed. Indicates a successful installation
(7) execute the following statement to initialize MySQL
Mysqld-initialize-insecure-user=mysql
After executing the command, the data directory is generated under the installation directory of MySQL and the root user is created.
(8) execute the following command to start the mysql service
Net start mysql
After execution, there will be the following prompt:
The MySQL service is starting..
The MySQL service has started successfully.
(9) after starting MySQL, the password of the root user is empty. Set the password as follows:
Mysqladmin-u root-p password new password
Enter password: old password
When you need to enter the old password, you can enter directly because the old password is empty.
The MySQL5.7.21 installation is complete.
This is the end of the method of installing version 5.7.21 of mysql. I hope the above content can be of some help to you and learn more. 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.