This tutorial is only applicable to Windows systems. If you have installed it but not yet installed it, be sure to delete the original database first, execute: mysqld --remove mysql, and then read my post! Step 1: Download the installation package from the MySQL official website Step 2: Unzip the downloaded installation package (mysql-8.0.12-winx64.zip) to the corresponding path. It is recommended to install it in a disk with larger space. (My installation path is: D:\mysql-8.0.12-winx64) Be sure to remember the installation directory here! ! Step 3: Create a new configuration file in the installation directory and name it my.ini (Please note that I encountered the biggest trouble when installing it, which was not specifically mentioned in previous experience posts. To create a configuration file, first create a new text document in the folder you unzipped, and then change the format. Be sure to change the txt extension to .ini). See below for details: The most critical step is here: copy and paste the following content in my.ini (copy it all): [mysql] ; Set the mysql client default character set default-character-set=utf8 [mysqld] ; Set port 3306 port = 3306 ; Set the installation directory of mysql basedir=D:\Software\Programming Software\Database\MySQL\mysql-8.0.12-winx64 ; Set the storage directory of mysql database data datadir=D:\Software\Programming Software\Database\MySQL\mysql-8.0.12-winx64\data ; Maximum number of connections allowed max_connections=200 ; The default character set used by the server is the 8-bit latin1 character set character-set-server=utf8 ; The default storage engine that will be used when creating a new table default-storage-engine=INNODB Step 4: Run the cmd.exe command line tool as an administrator: Right-click Command Prompt and select Run as Administrator Step 5: Execute the following command to go to the bin directory of the MySQL installation directory: #Enter the MySQL installation directory: cd /d D:\mysql-8.0.12-winx64\bin (Do not copy and paste directly here, because the folders we create may not be the same, so be sure to check your own installation directory) #Execute the command to install MySQL: mysqld install #Execute the following command to initialize the data directory (after 5.7, you must execute this command before you can start mysql) mysqld --initialize-insecure #Execute the following command to start mysql net start mysql Step 6: Configure the password for the root account: #Execute the following command to log in to mysql. You do not need to enter a password for the first login. Just press Enter. mysql -u root -p #After successful login, execute the following command to change the password (change newpassword to the password you set): alter user 'root'@'localhost' identified with mysql_native_password by 'newpassword'; #After changing the password, execute the following command to refresh the privileges: Step 7: Congratulations! mysql has been installed! The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Understand the implementation of Nginx location matching in one article
>>: Solution to JS out-of-precision number problem
1. Statistics of PV and IP Count the PV (Page Vie...
This article shares the specific code for impleme...
Preface In the daily development or maintenance o...
Table of contents 1. Retrieve via --skip-grant-ta...
1. MyISAM storage engine shortcoming: No support ...
Solution to the data asymmetry problem between My...
This article is compiled with reference to the My...
Preface In WeChat applet, you can use globalData ...
A few days ago, the library said that the server ...
Table of contents 1. Get the first link first 2. ...
What are XHTML tags? XHTML tag elements are the b...
[LeetCode] 175.Combine Two Tables Table: Person +...
Table of contents 1. Introduction to calculator f...
When any project develops to a certain complexity...
In combination with the scenario in this article,...