This article shares the download and installation of MySQL 8.0 for your reference. The specific contents are as follows The first thing to do is to download the 8.0 version of MySQL. You can go to the official website to download it, directly search for MySQL download on Baidu, and select the following page After entering, select the community version, which is community Select the zip version corresponding to the number of computer bits at the bottom You can also download the 64-bit version directly 1. Installation and configuration files Unzip the downloaded installation package in any path that is easy to find. Before initialization, we need to configure the my.ini file. Because there is no my.ini file in the folder after decompression, we need to create a new one, then copy the following content into it, and modify some paths according to the following prompts [mysqld] # Set port 3306 port=3306 # Set the installation directory of MySQL basedir=C:\Program Files\MySQL //Change to your database installation directory # Set the storage directory of MySQL database datadatadir=E:\database\MySQL\Data //Generally in the database root directory, that is, add Data to the above path # Maximum number of connections allowed 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 2. Database initialization Run the command prompt as an administrator and enter the bin directory of the MySQL installation directory and execute the command: mysqld --initialize --console . If you don't know how to enter the bin directory, you can go to Baidu. I won't explain it in detail here. C:\Program Files\MySQL\bin>mysqld --initialize --console 2018-04-28T15:57:17.087519Z 0 [System] [MY-013169] [Server] C:\Program Files\MySQL\bin\mysqld.exe (mysqld 8.0.11) initializing of server in progress as process 4984 2018-04-28T15:57:24.859249Z 5 [Note] [Server] A temporary password is generated for root@localhost: rI5rvf5x5G,E localhost is followed by a random password generated after initialization 3. Install and start the database service Continue to execute the command mysqld --install in the bin directory. After the installation is complete, you can start the MySQL service by executing the command net start mysql C:\Program Files\MySQL\bin>mysqld --install Service successfully installed. C:\Program Files\MySQL\bin>net start mysql MySQL service is starting.. The MySQL service has been started successfully. C:\Program Files\MySQL\bin> 4. Login and change password Execute the command in the bin directory of the MySQL installation directory: mysql -u root -p , then enter the password used during initialization. After successful entry, execute the command in MySQL: ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new password';, as shown in the figure below, the password is successfully changed C:\Program Files\MySQL\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.11 Copyright (c) 2000, 2018, 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. mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new password'; Query OK, 0 rows affected (0.06 sec) mysql> At this point, the installation and deployment is complete. You can use the command to view the default installed database: show databases . If it is as shown in the figure below, it means that the entire database installation process has been successfully completed. mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | |mysql | | performance_schema | |sys| +--------------------+ 4 rows in set (0.01 sec) mysql> 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:
|
<<: Analysis of Context application scenarios in React
summary In some scenarios, there may be such a re...
Many friends who have just started to make web pag...
Preface: To store multiple elements, arrays are t...
After creating a container locally, you can creat...
Linear-gradient background-image: linear-gradient...
In MySQL, there is a function called "group_...
1. Float: The main purpose is to achieve the effe...
Today, let’s get straight to the point and talk a...
I believe that many partners who have just come i...
I re-read the source code of the Fabric project a...
Table of contents 1. Swap partition SWAP 1.1 Crea...
1. Official website address The official website ...
<body> <div id="root"> <...
Table of contents What is React Fiber? Why React ...
<br />This example mainly studies two parame...