MySql 5.7.14 service does not report any error solution (recommended), mysql5.7.14
Refer to the installation steps of MySql 5.6 On the internet. After the MySql service is installed, an error is returned when you start the service using the net start mysql command:
MySQL service is starting. MySQL service cannot be started.
The Service did not report any errors.
Type net helpmsg 3534 for more help.
After searching, the solution is found.
The methods and steps are as follows:
1. Download MySQL from the official website
Http://dev.mysql.com/downloads/mysql/
ZIP Archive: mysql-5.7.14-winx64
2. decompress the package to installD: \ mysql, generate D: \ mysql \ mysql-5.7.14-winx64 directory, enter this directory, find the my-defualt.ini, add a new my. INI file, content for (change the inside D: \ mysql \ mysql-5.7.14-winx64 to your own software path, save ):
[Mysql] # set the default character set of the mysql client default-character-set = utf8 [mysqld] # set port 3306 to port 3306 # set the mysql installation directory basedir = D: \ mysql \ mysql-5.7.14-winx64 # Set the mysql database data storage directory datadir = D: \ mysql \ mysql-5.7.14-winx64 \ data # maximum number of connections allowed max_connections = 200 # the character set used by the server defaults to the 8-bit latin1 character set character-set-server = utf8 # default storage engine default-storage-engine = INNODB
3.run cmd.exe with the administrator ID
Cd to d: \ mysql \ mysql-5.7.14-winx64 \ bin directory
Enter the command mysqld install
Tip: Service successfully installed.
Start mysql after installation
Run the net start mysql command.
Versions later than 5.7 may fail to start, and an error is returned: the service did not report any errors.
Enter the command mysqld -- initialize
Under normal circumstances, there is no prompt. If a blank line is set, the initialization is successful.
Restart the service to enable it. The reason is that the data folder is missing in the 5.7 installation folder. After initialize, the folder and files are automatically generated.
4. Note:
1. if you copy data directories of other versions, you can start the service. However, we do not recommend this operation because you cannot ensure that the data Directories generated in the new version are the same as those of the old version.
2. Do not create the data directory by yourself before using the mysqld -- initialize command. Otherwise, all data directory files cannot be generated normally. the following error message is displayed:
D: \ mysql \ mysql-5.7.14-winx64 \ bin> mysqld -- initialize
2016-08-25T02: 26: 39.100728Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. please use -- explicit_defaults_for_timestamp server option (see documentation for more details ). 2016-08-25T02: 26: 39.100728Z 0 [ERROR] -- initialize specified but the data directory has files in it. aborting.
2016-08-25T02: 26: 39.110728Z 0 [ERROR] Aborting
In this case, delete the data directory created by yourself and then execute the mysqld -- initialize command.