Installation suggestion : Try not to use .exe for installation, but use compressed package for installation, which is more convenient for future uninstallation/version upgrade Download address : https://dev.mysql.com/downloads/mysql/ 1. Click the download address above to get the zip compressed package 2. Unzip to the directory to be installed Here is E:\database\mysql8\mysql-8.0.21-winx64\bin The data folder and my.ini file need to be created manually 3. Add environment variables My Computer -> Properties -> Advanced System Settings -> Environment Variables Select path to add: bin folder address under MySQL installation directory Here you need to pay attention to whether you have installed an old version of MySQL before, and you need to remove its environment variables img alt="" width="525" height="559" src="//img.jbzj.com/file_images/article/202008/2020081310113453.png" /> 4. Add MySQL configuration file my.ini In your MySQL installation directory, create a new my.ini file and edit The my.ini file writes the Mysql related configuration (different configurations can be made according to the actual situation), and pay attention to replacing the installation path [mysql] # Set the default character encoding of the mysql client to default-character-set=utf8mb4 [mysqld] #Set the port number, default is 3306 port = 3306 # Set the installation directory of mysql basedir=E:\database\mysql8\mysql-8.0.21-winx64\ # Set the data storage directory of mysql database datadir=E:\database\mysql8\mysql-8.0.21-winx64\data\ # Set the maximum number of connections max_connections=200 # The number of connection failures allowed is max_connect_errors=10 # The default character set used by the server is utf8mb4 character-set-server=utf8mb4 # The default storage engine that will be used when creating a new table default-storage-engine=INNODB #Default authentication is done with the "mysql_native_password" plugin #mysql_native_password default_authentication_plugin=mysql_native_password [client] # Set the default port used by the mysql client to connect to the server port = 3306 default-character-set=utf8mb4 E:\database\mysql8\mysql-8.0.21-winx64 needs to be changed to your own directory 5. Install MySQL service Start cmd in administrator mode , switch the path to the bin directory under the MySQL installation directory , and enter the following command cd \e E:\database\mysql8\mysql-8.0.21-winx64\bin mysqld –install An error message appears after entering the command: The following runtime libraries were installed successfully Link: https://pan.baidu.com/s/1hrOiKNEegCsc0uAa5MFDgw Extraction code: 36ma After downloading and installing, continue to execute the installation service command: The prompt service already exists, because the 5.7.26 version of mysql has been installed before and has not been uninstalled At this time, open cmd again as an administrator and enter the command sc query mysql to view the service named mysql Enter the command sc delete mysql to delete the old version of MySQL service Execute the installation command again 6. Initialize data files Enter the following command:mysqld --initialize-insecure --user=mysql 7. Start Mysql net start mysql 8. Change password mysql -u root –p When you enter the password, press Enter directly, and then you can enter the mysql management interface ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your password'; As shown below: Change the password to root 9. Restart mysql and it will work normally Here restart the cmd to run as an administrator Exit the MySQL management interface eixt Stop mysql service net stop mysql Start mysql service set start mysql Summarize This is the end of this article about the installation tutorial of MySQL 8.0.21 under Windows system. For more relevant MySQL 8.0.21 installation content, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: How to switch directories efficiently in Linux
>>: Detailed explanation of Js class construction and inheritance cases
The previous articles were all my own learning lo...
1. Basic Specifications (1) InnoDB storage engine...
1. Storage Engine In the last section, we mention...
Due to the needs of the work project, song playba...
1. Review Vue responsive usage Vue responsivenes...
sort Sort the contents of a text file Usage: sort...
1. Install cmake 1. Unzip the cmake compressed pa...
This article shares the specific code for impleme...
Table of contents 1. Test experiment 2. Performan...
Table of contents environment summary Module Func...
This is not actually an official document of IE. I...
nginx Nginx (engine x) is a high-performance HTTP...
Uninstall the installed version on Ubuntu: sudo a...
In MySQL, you may encounter the problem of case s...
Preface There are many devices nowadays, includin...