Outline
MySQL as the method most commonly used database, manually installed or slightly curved
First, download the installation package ( official website ) enter the page can not log on. Click the bottom of the "No thanks, just start my download ." To start the download.
installation:
Unzip the package directly to the path you want to install to, the equivalent of no installation, I can see the extraction path in the D drive ROUTE folder mysql8 folder, drawing the red line under the Date folders and my. ini file is not present when the decompression, I will not speak here, I will speak later when I installed, create a my.ini file in the unzipped folder, where code is as follows:
1 |
[mysqld] |
Nothing to say about the 3360 port, MySQL default port may be occupied, you can modify the port.
Then I wrote the above path is the relative path on the computer, second place (D: \ ROUTE \ mysql8 \ Data) Date refers to the file at the next initialization self-created folder, you do not change, I will follow Besides do it again. Then save it.
Configuration environment variable
Then let's configure the environment variables
right this computer and select Properties and then click on the "Advanced System Settings" click the environment variable to find the path in the system variable, tap path and then click on "Edit" and then point to New, and then point to browse directories point selection bin file OK on ok, then so determined to save when you quit, the environment variable configuration is successful.
Database initialization
Next, initialize the database
Find cmd, where you want to run as an administrator, how does it work?
We open the run (by win and R together), enter cmd carriage return can be seen that says C: \ Windows \ System32 \ cmd.exe then we find this path, the right to run as an administrator on the ok (of course you can also directly cmd in the search box and then right as administrator to run on the line, there is not demonstrated). then open to the bin directory: If it is not the C drive, such as my D drive, we must first enter D: because from cd command to use the C drive to another disk after disk must first go to the other and enter the cd ROUTE \ mysql8 \ bin if you open it with a cd in the C drive directly in accordance with the above form and enter the mysqld -initialize -console Note that mysqld not mysql is not a two horizontal cross, there is a space behind the word! And then enter this process takes about 30 seconds to display it renderings above, the contents of the box three display is fixed, the order also fixed, maybe no problem multi-display, the display must have a little problem, warning just a warning, do not have error and then be sure to remember here! ! ! ! ! ! ! @localhost: the next few strange characters are initialized password, do remember, or else forget the password to change the password of a lot of trouble! ! ! ! See Figure do not understand the word! ! ! !
Continue entering mysqld -install
Note: mysqld not mysql, with a space, not a two horizontal cross! ! ! I demonstrated this side is removed, and then the installation, as shown above is displayed on the basic're done
Then we close the black cmd window (do not forget your password! Password !!! password !!!), and then re-open a new cmd window as an administrator as you have previously entered net start mysql command to open the mysql service and then enter mysql -u root -p to access the database, which will let you enter a password! ! ! ! !
change Password
Then change a password easy to remember
to continue to enter the alter user 'root' @ 'localhost'identified with mysql_native_password by' new password ';
pay attention! ! ! ! ! The above sentence is not case-sensitive, but the password seems to distinguish! But still we have to sign symbols written in English, because I used the Chinese failed. . . . and also! ! ! ! End of the sentence in English semicolon see, no less! ! !
carry out
This time even completed.
Note: If you have problems will be error, search for yourself to fully solve their own problems