Solve the problem that Mysql5.7.17 fails to install and start under Windows

Solve the problem that Mysql5.7.17 fails to install and start under Windows

Install MySQL for the first time on your machine.

The operating system is win7

The installation file of mysql is in zip format and the version is 5.7.17

After decompression, the installation steps are

1. First, find a file to store these installation programs and data

Assume it is E:\\mysql

2. Put the unzipped files in E:\\mysql and create a new data folder

3. Create the environment variable mysql path is E:\\mysql

Add to path %MYSQL%\bin;

4. There is a my-default.ini in the unzipped folder.

First, make a copy of the file and rename it to my.ini

Modify file contents

Just modify two lines

basedir = E:\\mysql 
datadir = E:\\mysql\\data

These two lines were originally commented out with #.

5. Start the command line as a system administrator

Type mysqld -install

This is to install the mysql service

6. Enter mysqld --initialize

This is because after version 5.7.7, the Windows installation of MySQL through zip decompression no longer contains the data folder. You can refer to the introduction on the official website for this.

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 start when it is started. You can find some errors by observing the files with the suffix .err in the data folder.

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 are placed in the data folder, so we need to execute the command mysqld -initialize to complete the initialization of mysql. In this way, mysql will automatically complete some initialization work.

7. Start the service net start mysql

The above is what I introduced to you about how to solve the problem of unsuccessful installation and startup of Mysql5.7.17 under Windows. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!

You may also be interested in:
  • Tutorial on installing mysql5.7.17 on windows10
  • MySQL 5.7 installation tutorial (windows)
  • Graphic tutorial on how to modify the initial password of Mysql5.7.11 under Windows
  • Comprehensive analysis of the method of installing mysql5.7 under Windows
  • mysql5.7.13.zip installation tutorial (windows)

<<:  Detailed explanation of the use of redux in native WeChat applet development

>>:  How to use the Linux more command in Linux common commands

Recommend

A practical record of encountering XSS attack in a VUE project

Table of contents Preface Discover the cause Cust...

Sublime Text - Recommended method for setting browser shortcut keys

It is common to view code effects in different br...

Vue3.0 implements the encapsulation of the drop-down menu

Vue3.0 has been out for a while, and it is necess...

Implementation of TCPWrappers access control in Centos

1. TCP Wrappers Overview TCP Wrappers "wraps...

Vite+Electron to quickly build VUE3 desktop applications

Table of contents 1. Introduction 2. Create a Vit...

MySQL database connection exception summary (worth collecting)

I found a strange problem when deploying the proj...

The use of v-model in vue3 components and in-depth explanation

Table of contents Use two-way binding data in v-m...

CSS Naming: BEM, scoped CSS, CSS modules and CSS-in-JS explained

The scope of css is global. As the project gets b...

Tips for organizing strings in Linux

In Linux operations, we often replace and count s...

Detailed steps to deploy SpringBoot projects using Docker in Idea

Preface Project requirements: Install the Docker ...

Detailed graphic explanation of mysql query control statements

mysql query control statements Field deduplicatio...

Start a local Kubernetes environment using kind and Docker

introduce Have you ever spent a whole day trying ...

5 Reasons Why Responsive Web Design Isn’t Worth It

This article is from Tom Ewer's Managewp blog,...

Implementation of vue3.0+vant3.0 rapid project construction

Table of contents 1. Project Construction 2. Vue3...

Ideas for creating wave effects with CSS

Previously, I introduced several ways to achieve ...