1. Official website download
2. Unzip to the appropriate directory
3. Configuring environment variables
4. Create a new my.ini and open it in notepad. Copy the following code. You can’t initialize parameters without my.ini when the database starts.
[mysql] Setting the default character set of MySQL client default-character-set=utf8 [mysqld] Setting up port 3306 port = 3306 Set up the installation directory of MySQL basedir=D:\Software\Programming Software\Database\MySQL\mysql-8.0.15-winx64 Set up the storage directory of data in MySQL database datadir=D:\Software\Programming Software\Database\MySQL\mysql-8.0.15-winx64\data Maximum number of connections allowed max_connections=200 The character set used by the server defaults to 8-bit coded Latin1 character set character-set-server=utf8 Default storage engine to be used when creating new tables default-storage-engine=INNODB
5. Enter the bin directory of MySQL
In the command line window, enter: mysqld — install, return, prompt: Service successfully installed, indicating that the registration service was successful.
6. Open the CMD command window as an administrator. (Get the initial password, choose one or two)
First: Input mysqld — initialize command to initialize mysql’s data data directory. After initialization, a data folder will be generated under the decompressed directory. Under this folder, there is a file with the end of. err. When opened, there will be a random password.
The second is to use the mysqld — initialize — console command to generate random passwords
7. Start service: net start MySQL
8. Log in with a random password and modify the password: mysql-u root-p
9. Modify the login password’New password‘to replace the new password you need