Solve the problem that Mysql5.7.17 fails to be installed and started in windows, mysql5.7.17windows
First install MySQL on the machine,
Windows 7
The mysql installation file is in zip format and the version is 5.7.17.
After decompression, the installation steps are as follows:
1. First, find a file to store the installation program and data.
Assume E: \ mysql
2. Place the decompressed file in E: \ mysql and create a new data folder.
3. create the environment variable mysql path E: \ mysql
Add to path % MYSQL % \ bin;
4. There is a my-default.ini under the decompressed folder
First, copy the file and rename it to my. ini.
Modify file content
Only two rows can be modified.
basedir = E:\\mysql datadir = E:\\mysql\\data
The two lines were originally commented out with the # number,
5. Start the command line as a system administrator
Inputmysqld -install
This is the installation of the mysql Service
6. Inputmysqld --initialize
This is because mysql is installed in windows after version 5.7.7 and is decompressed by zip without the data folder. For details, refer to the official website.
Http://dev.mysql.com/doc/refman/5.7/en/windows-initialize-data-directory.html
If there is no data folder, the mysql service will not be started. You can find the file with the. err extension in the data folder, and such errors will be reported.
MySQL: Table 'mysql.plugin' doesn't exist 2017-01-01T17:13:33.200113Z 0 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it. 2017-01-01T17:13:33.202113Z 0 [Note] Salting uuid generator variables, current_pid: 6908, server_start_time: 1483290810, bytes_sent: 0, 2017-01-01T17:13:33.237115Z 0 [Note] Generated uuid: '9fb87162-d045-11e6-b092-00ff173a9c42', server_start_time: 1483297718, bytes_sent: 114009376 2017-01-01T17:13:33.241115Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 9fb87162-d045-11e6-b092-00ff173a9c42. 2017-01-01T17:13:33.248116Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened. 2017-01-01T17:13:33.250116Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key 2017-01-01T17:13:33.254116Z 0 [Note] Server hostname (bind-address): '*'; port: 3306 2017-01-01T17:13:33.259116Z 0 [Note] IPv6 is available. 2017-01-01T17:13:33.260117Z 0 [Note] - '::' resolves to '::'; 2017-01-01T17:13:33.261117Z 0 [Note] Server socket created on IP: '::'. 2017-01-01T17:13:33.266117Z 0 [Warning] Failed to open optimizer cost constant tables 2017-01-01T17:13:33.268117Z 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist 2017-01-01T17:13:33.270117Z 0 [ERROR] Aborting
In fact, this is because these representations are placed in the data folder, so we need to first execute the commandmysqld -initialize
After mysql Initialization is completed, mysql will automatically complete some initialization work.
7. Start the servicenet start mysql
The above section describes how to solve the problem that MySQL 5.7.17 fails to be installed and started in windows. If you have any questions, please leave a message, the editor will reply to you in a timely manner. Thank you very much for your support for the help House website!