1. Purpose
Install mysql server and client use navicat link
2. Process
1) Download mysql server
The download process (refer https://blog.csdn.net/youxianzide/article/details/85319106 ), in a variety of shots in the older generation find exactly what we want community, free installation version
Is divided into three version: Enterprise, Business, Community Edition, where the Enterprise, the commercial version is fee-based version
Official website to download the following address: https://dev.mysql.com/downloads/mysql/
The highest version 8.0, I chose the previous version of mysql-5.7.29-winx64
2) Installation mysql server
First, configure the environment variables ( My Computer - Advanced System Settings - environment variable ), recorded under the Path system variables point to open, add mysqlbin mysql directory and directory, as shown below
Secondly cmd command with an administrator run the mysqld -install
If you have an error occurs, congratulations you won the lottery, there is no winning skip this step
3) mysqld -install installation error prompt unable to find VCTUNTIME140_1.dll
Refer to this blog ( https://blog.csdn.net/weixin_39399203/article/details/104203650 ) I use the second method, download VCTUNTIME140_1.dll, Download https://cn.dll-files.com/ vcruntime140_1.dll.html
Unzip the file in the C: \ Windows \ System32
Re mysql -install discover at this time and there is no error, the next step
4) continue to try to install mysql, prompted The service already exists
Reference ( https://blog.csdn.net/qq_39701269/article/details/77935490 )
Re-run as administrator, type sc query mysql, mysql look at the service name:
Command sc delete mysql, mysql delete the
Continue with the installation can be successful, my success installation screenshots
Deleted successfully, re-install it successfully
5) Start mysql service
Continue cmd command net start mysql discovery service failed to start, I was too miserable to me, one step at a pit in my way, do not skip this step fails
Enter mysql bin directory
If there my.ini directly edit, I did not
Create a text file, rename the file and edit the my.ini
Filling installation directory need to modify the following
[Client] Port = 3306 default -character- the SET = utf8 [mysqld] # set their own MYSQL installation directory basedir = D: \ AboutDB \ MySQL \ mysql- 5.7 . 29 -winx64 \ mysql- 5.7 . 29 - Winx64 # Set MYSQL data directory is DATADIR = D: \ AboutDB \ MySQL \ MySQL- 5.7 . 29 -winx64 \ MySQL- 5.7 . 29 - Winx64 \ data Port = 3306 the character_set_server = UTF8 the sql_mode =NO_ENGINE_SUBSTITUTION, NO_AUTO_CREATE_USER # open the query cache explicit_defaults_for_timestamp = to true Skip -grant-the Tables
After the administrator open a command line, go to the bin directory, execute the command mysqld --initialize --user = mysql --console
Appears randomly generated passwords, remember to save
Command line mysql -u root -p
Enter the random password
Enter myql
Then change the root password for the USER the ALTER 'root' @ 'localhost' IDENTIFIED BY ' abc.123 your password ' PASSWORD EXPIRE NEVER;
FLUSH PRIVILEGES;
Logically speaking at this time can use the new password to access the service mysql
PASSWORD EXPIRE NEVER is a password never expires
To avoid mistakes, this time the command line first not off.
6) Use navicat link mysql
If you then click on the test appears Authentication plugin 'caching_sha2_password' can not be loaded
Congratulations, you, like me at the next sign
The solution is to continue to operate the command line mysql, reference https://www.cnblogs.com/zhurong/p/9898675.html
The USER the ALTER 'root' @ 'localhost' IDENTIFIED BY the WITH mysql_native_password ' abc.123 your password ';
FLUSH PRIVILEGES;
I do not want to keep, at the next sign, each time the pit