MySQL 8.0.20 installation and configuration super detailed tutorial under Win10 system MySQL Downloads You can download MySQL directly from the official website and choose the community version (free) to download, link. Select Microsoft Windows in Select operating system. The latest version of MySQL will appear below. Currently it is MySQL 8.0.20. There are two zip files. Select the first one, Windows (x86, 64-bit), ZIP Archive, and click the Download button on the right to download it. The download speed from the official website is sometimes slow, you can also download it by clicking the link directly: mysql 8.0.20 Installation and Configuration Unzip the downloaded compressed package to an all-English directory. For example, I created a MySQL folder on drive D and unzipped it to that folder, D:/MySQL Then add the path where mysql 8.0.20 is located, D:\MySQL\mysql-8.0.20-winx64, to the environment variable Path Next, officially install and configure MySQL: 1. First, create a my.ini file in the D:\MySQL\mysql-8.0.20-winx64 path. Simply create a new text document and rename it to my.ini. Add the following to your document: [mysqld] # Set port 3306 port=3306 # Set the installation directory of MySQL basedir=D:\\MySQL\\mysql-8.0.20-winx64 # Here is the decompression path of MySQL # Set the storage directory of MySQL database datadir=D:\\MySQL\\mysql-8.0.20-winx64\\Data # Same as above, do not create the Data directory in the path first, it will be automatically generated during initialization later # Allow the maximum number of connections max_connections=200 # The number of connection failures allowed. This is to prevent someone from trying to attack the database system from this host max_connect_errors = 10 # The default character set used by the server is UTF8 character-set-server=utf8 # The default storage engine that will be used when creating a new table default-storage-engine=INNODB # By default, the "mysql_native_password" plug-in is used for authentication. default_authentication_plugin=mysql_native_password [mysql] # Set the default character set of the mysql client to default-character-set=utf8 [client] # Set the default port used by the mysql client to connect to the server port = 3306 default-character-set=utf8 (ii) Open cmd with administrator privileges (note that it must be opened with administrator privileges) and switch the path to D:\MySQL\mysql-8.0.20-winx64\bin Microsoft Windows [Version 10.0.18363.815] (c) 2019 Microsoft Corporation. All rights reserved. C:\Windows\system32>D: D:\>cd MySQL D:\MySQL>cd mysql-8.0.20-winx64 D:\MySQL\mysql-8.0.20-winx64>cd bin D:\MySQL\mysql-8.0.20-winx64\bin> Enter mysqld --initialize --console to initialize. This step can get the initial password of mysql. The string after root@localhost is the initial password. Write it down first, as you will need it later. D:\MySQL\mysql-8.0.20-winx64\bin>mysqld --initialize --console 2020-05-10T11:26:21.895908Z 0 [System] [MY-013169] [Server] D:\MySQL\mysql-8.0.20-winx64\bin\mysqld.exe (mysqld 8.0.20) initializing of server in progress as process 9764 2020-05-10T11:26:21.897278Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous. 2020-05-10T11:26:21.915225Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2020-05-10T11:26:22.619057Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2020-05-10T11:26:24.265774Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: 9Zh31zk-@mof Enter mysqld --install (If you need to install multiple MySQL services, enter mysqld --install [service name] in this step) D:\MySQL\mysql-8.0.20-winx64\bin>mysqld --install Service successfully installed. If it displays "Service successfully installed", it means the installation is successful. Enter net start mysql to start the MySQL service. D:\MySQL\mysql-8.0.20-winx64\bin>net start mysql The MySQL service is starting. The MySQL service was started successfully. Enter mysql -u root -p , log in to mysql using the initial password, and enter the initial password after Enter password D:\MySQL\mysql-8.0.20-winx64\bin>mysql -u root -p Enter password: ************ Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 8 Server version: 8.0.20 Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. After logging in, change the initial password to a password that is easy for you to remember. mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your own defined password; Query OK, 0 rows affected (0.02 sec) At this point, you have completed the process. Type show database; to see which tables are included. mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | |mysql | | performance_schema | |sys| +--------------------+ 4 rows in set (0.01 sec) Wonderful topic sharing: MySQL different versions installation tutorial MySQL 5.7 installation tutorials for various versions MySQL 5.6 installation tutorials for various versions mysql8.0 installation tutorials for various versions 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:
|
<<: A complete list of commonly used Linux commands (recommended collection)
>>: Vue uses Echarts to implement a three-dimensional bar chart
This article mainly introduces an example of Vue ...
Syntax format: row_number() over(partition by gro...
Two implementations of Vue drop-down list The fir...
Note: It is recommended that the virtual machine ...
Download image docker pull openjdk Creating a Dat...
I don’t know if you have noticed that when we ope...
1. Project Structure 2.CallTomcat.java package co...
Text truncation with CSS Consider the following c...
Table of contents 1. Preparation before installat...
I encountered such a problem during development A...
How to view version information under Linux, incl...
Referring to the online information, I used cmake...
MySQL is divided into Community Edition (Communit...
When a web project gets bigger and bigger, its CS...
Configuration Preface Project construction: built...