This article shares with you a detailed tutorial on how to install and configure MySQL 8.0.20 for your reference. The specific contents are as follows 1. Download the mysql8.0.20 installation package MySQL official website: link You can also download it by clicking the link directly: mysql 8.0.20 Find the installation package and download it. (The official website is in English. If you don’t understand it, you can copy the website to Google for translation) Click Skip login to download directly to your local computer. Install mysql1. After downloading, it is a zip compressed file Unzip it. 2. After decompression, set the environment variables Right-click My Computer ===>Click Properties ===>Click Advanced System Settings ===>Environment Variables ===>System Variable Path ===>Edit ===> Click Advanced system settings Click on Environment Variables Find path in system variables and click edit Click New and put the bin path where you installed MySQL. Mine is D:\JAVA\mysql8.0(Windows)\mysql-8.0.20-winx64\mysql-8.0.20-winx64\bin, so this path is written in the environment variable. After configuring the environment variables, click OK. 3. Configure MySQL Because there is no my.ini file in the zip of the latest version, you need to create a new my.ini file yourself. (my.ini is some configuration, such as port, number of connections, etc.) Remember to check the location, don’t make a mistake! [mysqld] #Set port 3306 port=3306 #Set the installation directory of mysql basedir=D:\JAVA\mysql8.0(Windows)\mysql-8.0.20-winx64\mysql-8.0.20-winx64 #Set the storage directory of mysql database datadatadir=D:\JAVA\mysql8.0(Windows)\mysql-8.0.20-winx64\mysql-8.0.20-winx64\Data #Maximum number of connections allowed max_connections=200 #The number of connection failures allowed. 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 uses the "mysql_native_password" plugin #mysql_native_password default_authentication_plugin=mysql_native_password [mysql] #Set the default character set of MySQL client default-character-set=utf8mb4 [client] #Set the default port used by the mysql client to connect to the server port=3306 default-character-set=utf8mb4 Remember to modify the mysql installation path to be consistent with your own installation path. 4. Initialize and start mysql 1. Please note that some tutorials may ask you to create a new data folder in the root directory of mysql-8.0.20-winx64 if there is no data folder. This is problematic. When you use the command line to install MySQL later, you will not be able to find the initial login password. In fact, a new data folder will be automatically created when you enter the mysqld --initialize command to initialize MySQL. If not, remember to create one manually. 2. Enter cmd in the bin directory and open the command as an administrator. After entering cmd, press Enter You can also open the cmd command directly as an administrator, and then use the cd command to switch to the bin directory Then run mysqld --initialize --console Order. After execution, find the sentence A temporary password is generated for root@localhost:. The initial password is after localhost. Start service input net start mysql enter mysql -u root -p Log in to the database, and you will be prompted for a password. Then use the password above to log in and modify the password statement: ALTER USER root@localhost IDENTIFIED BY '123456'; Change password to: 123456 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:
|
<<: Record the process of connecting to the local Linux virtual machine via SSH
>>: Vue echarts realizes dynamic display of bar chart
Previously, I introduced several ways to achieve ...
This article example shares the specific code of ...
What I want to share today is to use native JS to...
CentOS6.9 installs Mysql5.7 for your reference, t...
After docker run, the status is always Exited Sol...
The overall architecture of MySQL is divided into...
<!DOCTYPE html> <html lang="en"...
Table of contents Scope Global Scope Function Sco...
1. Background of Parallel Replication First of al...
This article records the specific method of insta...
The essence of a flat website structure is simpli...
1. Background 1.1 Problems A recent product testi...
Previously, the images we used were all pulled fr...
1. IE browser mode Hack logo 1. CSS hack logo Copy...
We are not discussing PHP, JSP or .NET environmen...