Table of contents
The specific operation of decompressed version installation is as follows:
Then configure our environment variables:
Next click on Environment Variables
When we are using Mysql, if we forget the password, it is very troublesome to find it again, so here we teach you another method
We all know that mysql can be installed on our computer in two ways:
Installed version
decompressed version
Installing through the decompressed version does not require a password
So when we forget the password, we can uninstall Mysql and install it through the decompressed version, so that we can reuse our mysql
The specific operation of decompressed version installation is as follows:
First of all, we need to find the decompressed version of the file, and then decompress it to the file you want to decompress (the decompression path here is very important, it will be used when configuring the environment variables later)
Then configure our environment variables:
Find system advanced options
Next click on Environment Variables
Find the path to edit
Click New and copy the decompressed path into it (make sure there are decompressed files in our decompressed path)
After configuring the environment variables successfully, next we need to configure the MySQL configuration file.
Open the folder you just decompressed (the decompressed folder), create a my.ini configuration file under this folder, and edit my.ini to configure the following basic information:
Note: the file in ini format cannot be created directly, so we can first create a text document my.txt in txt format, then edit the above code in this document, and finally rename my.txt to my.ini.
Next, let's start the MySQL database:
Open the cmd command line tool as an administrator, switch the directory to the decompression path
Type in the console
mysqld install
You will see that the service installation is successful
Then initialize data (required after MySQL5.7)
run after initialization
net start mysql
You can start mysql.
Then enter:
mysql -u root
Now that you have entered mysql, then enter
show databases;
When you see the following interface, it proves that you have successfully installed
Then go to the decompressed installation package to find a startup program (the one under the mysql folder)
After clicking, install and you can enter Mysql normally.