First of all, let me talk to you about my daily life. With the rapid update of MySQL, MySQL has been updated to version 8.0 by leaps and bounds. So what is the obvious difference between it and the 5.X version we used before? First of all, let's show you the query speed of the built-in table of MySQL5.X Then I will present the query speed of the built-in table of MySQL 8.0 The same data results are obvious. I have walked through all the pitfalls of MySQL 8.0. In order to save you from taking detours, I offer the following manual installation method 1. Download and unzip from the official website I downloaded mysql-8.0.11-winx64, download address Just click on the hyperlink I circled with a red marker. The Chinese meaning of this sentence is: No need, just start downloading 2. Set system environment variables I won't say much about this. There are a lot of Baidu. This configuration is just for the convenience of the command line... 3. Write the configuration file For example, the decompression location is D:\App\MySQL\mysql-8.0.11-winx64 Manually create the my.ini file here, the file content is as follows: Note: modify the installation directory and data storage directory [mysql] ; Set the mysql client default character set default-character-set=utf8 [mysqld] ; Set port 3306 port = 3306 ; Set the installation directory of mysql basedir=D:\App\MySQL\mysql-8.0.11-winx64 ; Set the storage directory of mysql database data datadir=D:\App\MySQL\mysql-8.0.11-winx64\data ; Maximum number of connections allowed max_connections=200 ; The default character set used by the server is the 8-bit latin1 character set character-set-server=utf8 ; The default storage engine that will be used when creating a new table default-storage-engine=INNODB 4. Database initialization Run the command line as an administrator, enter the bin directory where MySQL is installed and enter the following command: Automatically generate a root user without a password: mysqld --initialize-insecure Or with a random password: mysqld --initialize The random password is saved in the error log, located in the data folder (previously configured datadir), with the file name: hostname.err Note: If you want to reinitialize, you must first clear the data folder. (Including stopping the next service) The tutorial I watched did not have this step, resulting in:
5. Install and start the service Execute it on the command line. Installation Service: mysqld -install Start the service: net start mysql When rolling back, stop and uninstall the service: net stop mysql mysqld -remove 6. Enter MySQL No password required: mysql -u root Password-protected access: mysql -u root -p If you have a password, you will be asked to enter it when you enter. If you have a random password, the location is mentioned above. Touched, finally saw it: mysql> Finally, if the client connection has a caching-sha2-password problem The solution is as follows:
If you make mistakes or don't understand something, please leave a comment below and I will answer them patiently. Wonderful topic sharing: MySQL different versions installation tutorial MySQL 5.6 installation tutorials for various versions MySQL 5.7 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:
|
<<: WeChat Mini Program User Authorization Best Practices Guide
>>: How to implement remote connection for Redis under Linux
Enable remote access Enable remote access rights ...
background Getting the slow query log from mysql....
This article example shares the specific code for...
Table of contents Semaphore Nginx hot deployment ...
I recently used the ssm framework when doing a pr...
Purpose: Nested use of MySQL aggregate functions ...
The use of computed in vue3. Since vue3 is compat...
1. CDN It is the most commonly used acceleration ...
There are some problems with the compressed versi...
echarts component official website address: https...
Rem layout adaptation The styles in Vant use px a...
1. Set firewall rules Example 1: Expose port 8080...
1. Introduction When filtering unknown or partial...
1. Differences between JSON.stringify() and JSON....
Generally, during the development process, the su...