PrefaceA few days ago, I downloaded and installed the latest version of MySQL 8.0.22. I encountered many problems. I referred to some methods and finally solved them. Today I recorded my installation process, hoping it will be helpful to you. 1. Download MySQL 8.0.22 from the official websiteClick to enter the MySQL official website: https://www.mysql.com/ ① Click DOWNLOADS ② Scroll down and find MySQL Community (GPL) Downloads and click to enter ③ MySQL Community Server ④Download ⑤ Unzip, the internal files are as shown in the figure (data and database are created later, there are no such two folders in the downloaded file) 2. Set environment variables① Find the control panel and enter in the order of "Control Panel - System and Security - System - Advanced System Settings - Environment Variables". ② First find "path", then write the path of the bin folder in the downloaded MySQL file. Then keep clicking OK to exit the control panel. 3. Create the initialization file mysql.ini① Creation method: Create a new text document and change the suffix to ".ini". You can name it as you like. I named it mysql.ini ②Click to enter the .ini file and copy the following content into it [mysqld] # Set port 3306 port=3306 # Set the installation directory of mysql to basedir=D:\mysql-server\mysql-8.0.22-winx64 # Set the storage directory of mysql database data datadir=D:\mysql-server\mysql-8.0.22-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 is done with the "mysql_native_password" plugin #mysql_native_password default_authentication_plugin=mysql_native_password [mysql] # Set the default character set of the mysql client to 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 3. Initialize MySQL① Follow the path shown in the figure to find the location of cmd, right-click and select Run as Administrator. Note that you must run it as an administrator , otherwise an error will be reported. ② Enter the bin directory of mysql ③ Enter the following command mysqld --initialize --console After running, a string of passwords will appear. Please remember this password for subsequent operations: 4. Install MySQL service① Continue to enter the following commands in the cmd window mysqld --install Since I have already installed it, it says “already exists” here. The first successful sign should be "Service successfully installed!" ② Continue to enter the following command in the cmd window to start the MySQL service net start mysql When it appears
When you see the prompt, it means you have started successfully. 5. Change MySQL passwordThe automatically generated password is too complex and needs to be entered every time you log in. To facilitate login, you need to change the password. Continue typing in the cmd window mysql -u root -p Then enter the password you just generated; Then continue to enter ALTER USER 'root'@'localhost' IDENTIFIED BY 'your password'; Modification successful; Enter exit to exit MySQL. The MySQL installation is successfully completed. Summarize
This is the end of this article about the latest version of MySQL 8.0.22 download and installation super detailed tutorial (Windows 64-bit). For more relevant MySQL 8.0.22 download and installation content, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Solve the problem that changes to the Docker MySQL container database do not take effect
>>: HTML Tutorial: Ordered Lists
I designed and customized a navigation bar with a...
1. Function Introduction sed (Stream EDitor) is a...
Table of contents What is multi-environment confi...
Preface Engineers working in the Linux environmen...
This article shares the specific code of Vue to a...
Have you ever encountered a situation where we hav...
Table of contents 1. Environmental Installation 2...
Click here to return to the 123WORDPRESS.COM HTML ...
Preface Relational databases are more likely to b...
Summary of common functions of PostgreSQL regular...
Table of contents 1. Sample code 2. See the essen...
This article shares the installation and configur...
Docker basic instructions: Update Packages yum -y...
The difference between CSS3 animation and JS anim...
The test environment is set up with a mariadb 5.7...