One
Download good after extracting files, unzip the content, you can extract the content to the desired location, the cases urealyticum pressure to "D:\phpweb\mysql",
There is a problem with the new version of the folder without the data name, this folder is the name of the file,
You can put in any other place, you think the convenient location, as long as the following configuration on the path is good, here I still put under "D:\phpweb\mysql".
Two
Open the file with Notepad My-default.ini, some friends may like to create their own new My.ini file, please help yourself, I still use the default file to change. Before and after the most basic configuration
1, remove Basedir and DataDir front of the #
2, Basedir added is the decompression path of MySQL;
3, DataDir added is the MySQL Data folder path.
4, Port = 3306 Set the dedicated database server and port 3306, there is a conflict can choose to modify
Three
Add the path of the bin to the value of the path variable, remembering to append to the last, not overwrite.
Here's how:
1, in order to prevent errors, copy the path of the Bin folder in the address bar, such as the example "D:\phpweb\mysql\bin"
2. Open Computer Desktop: computer, right---Properties, advanced system settings, advanced systems, environment variables (N), System variables (S), find variable path-> edit;
3. After adding the path variable value to the MySQL bin path you just copied.
PS: note here that the different paths are in English ";" Separate) OK, exit.
Four
1. Run cmd as administrator (be sure to run as administrator, or not have enough permissions),
2, enter: D: [carriage return] (because in the D drive, to go to the D drive first)
3, Input: CD D:\phpweb\mysql\bin [Enter] into the bin folder of MySQL (regardless of whether you have configured the environment variable, also to enter the Bin folder, or after the start of the service will still report error 2)
4. Input: mysqld--install [carriage return] (This command is to install the service, after the execution, prompt English success, this time you can see in your Windows Service MySQL service, but did not start.) )
5, Input: mysqld--initialize--console This step is important, this is the initialization database, and then you can see in the final initialization of an [email protected]: There is a series of alphanumeric symbols, which is automatically generated by MySQL for you Random password, be sure to write down, a while we log in to the MySQL database to use.
PS: Use-initialize generate random password, use-initialize-insecure generate blank password, initialize Data folder will be generated automatically, do not create a new OH.
V. Start the MySQL service before you can use MySQL database. There are two ways to start MySQL:
Method One: Start the input with the command: net start MySQL [Enter]
Method Two: Start from the Windows service
Six
At this point we need to change the password for the database
Log in to MySQL database command
Input: mysql-uroot-p [Return]
Ask you to enter the password, the MySQL generated a random password input, and then enter, landed in, into the database we can change the password
The command to change the password is as follows:
After completion, execute "quit" to exit.
Decompression version of MySQL installation