This paper takes MySQL5.7.11 as an example to introduce the installation of Mysql5.7.zip under win system.
First, the prerequisite conditions:
1. Win Administrator
2. mysql installation package (Zip package)
Second, the installation process
First unzip the MySQL installation package to the path you want to install (such as D:\javaide\mysql-5.7.11-winx64), and then edit the My-default.ini file, under [Mysqld] metabase root directory, data storage directory, software port:
Basedir = d:/javaide/mysql-5.7.11-winx64
DataDir = D:/javaide/mysql-5.7.11-winx64/data
Port = 3306
In addition to the above configuration, you can also continue to configure the default character encoding for the server under [mysqld]:
Character-set-server=utf8
when configured, save, change My-default.ini to My.ini.
Administrator to open cmd, then switch to the database bin directory, execute mysqld install:
D:\javaide\mysql-5.7.11-winx64\bin>mysqld Install
after a successful installation, you will be prompted:
Service successfully installed.
Third, initialization
Once you have successfully installed the MySQL service, you can initialize the database and execute the following command in the database Bin directory:
Copy Code code as follows:
D:\javaide\mysql-5.7.11-winx64\bin>mysqld.exe--defaults-file= "D:\javaide\mysql-5.7.11-winx64\my.ini"-- Initialize--explicit_defaults_for_timestamp
Default-file is the server's profile path and needs to point to your own installed directory.
After the initialization succeeds, the DOS will return to the receiving command status without corresponding prompts:
D:\javaide\mysql-5.7.11-winx64\bin>
Four, start the database, modify the password
When the database is initialized, you can start the database service and start with the net start MySQL command:
D:\javaide\mysql-5.7.11-winx64\bin>net start MySQL
added: Stop mysql service command
D:\javaide\mysql-5.7.11-winx64\bin>net stop MySQL
the completion of the database startup prompts for the appropriate success message:
MySQL Service is starting ...
The MySQL service has started successfully.
Then, you can go to find the login password, login password in the data directory (My.ini configuration of the DataDir directory) of the log file, such as mine is under the D:\javaide\mysql-5.7.11-winx64\data. The file name is computer name. Err; For example, My computer is named LAPTOP-J709AKSF, the password is in the Laptop-j709aksf.err file, open the file in Notepad or notepad++ or any text editor, ctrl+f, Search Password keyword,
Find the following line of information:
2016-03-16t02:41:45.969406z 1 [note] A temporary password are generated for ROOT@LOCALHOST:R1DIABLW&HGP
The corresponding login password is R1DIABLW&HGP
Log on to MySQL with root:
D:\javaide\mysql-5.7.11-winx64\bin>mysql-u root-p
Enter the password you found:
Enter Password: ************
Once the login is successful, you can change the password for root (change the password to root) as follows:
mysql> Set Password = password (' root ');
after the modification is successful, you will be prompted as follows:
Query OK, 0 rows affected, 1 warning (0.27 sec)
If the modification succeeds, you can exit with the new password.
Mysql> exit
Bye
Above is the MySQL 5.7.11 winx64 installs the configuration tutorial, hoped that has the help to everybody's study, also hoped that everybody supports the cloud habitat community.