Solutions to MySql crash and service failure to start

Solutions to MySql crash and service failure to start

I have been in contact with PHP for so long, but the installation environment is very unfamiliar. I encountered many problems. With the help of Baidu, I sorted out the following methods

Problem 1: MySQL service is not installed

Solution:

Find the installation directory of MySQL under cmd operation (note that cmd must be run as an administrator)
Execute the mysqld -install command with administrator privileges in the mysql bin directory

Then, still with administrator privileges, net start mysql to start the MySQL service.

1. Use the administrator's authority to net stop mysql to shut down the mysql service
2. Uninstall the MySQL service with the administrator's privileges mysqld -remove

Error:

The information is as follows:

Install/Remove of the Service Denied

Problem 2: Install/Remove of the Service Denied

Solution:

When opening the cmd.exe program, select "Open as administrator".

After opening it as an administrator, I started the service, but it still doesn't work.

Problem 3: The service cannot be started

The mysqld -console command outputs an error message. One of the error messages is that there is no mysql folder in the data directory.

Solution:

Execute mysqld –initialize to initialize the data directory

After these problems were solved, mysql started normally.

Problem 4: Wrong password

If the password is wrong, cmd will also crash.

Solution:

Tutorial on how to modify the root password in MySQL 5.7

MySQL 5.6 root password modification tutorial

Summarize

The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. If you want to learn more about this, please check out the following links

You may also be interested in:
  • Alibaba Cloud ESC Server Docker Deployment of Single Node Mysql
  • Summary of the differences between MySQL storage engines MyISAM and InnoDB
  • Several solutions for forgetting the MySQL password
  • Tomcat+Mysql high concurrency configuration optimization explanation
  • Why does MySQL database index choose to use B+ tree?
  • Explanation of MySQL's horizontal and vertical table partitioning
  • Detailed explanation of how to use CMD command to operate MySql database
  • MySQL 5.6 root password modification tutorial
  • Tutorial on how to modify the root password in MySQL 5.7
  • How to add indexes to MySQL

<<:  How to implement page screenshot function in JS

>>:  Detailed explanation of SRIOV pass-through configuration and performance testing based on KVM

Recommend

Mysql timeline data to obtain the first three data of the same day

Create table data CREATE TABLE `praise_info` ( `i...

CSS3 flexible box flex to achieve three-column layout

As the title says: The height is known, the width...

React error boundary component processing

This is the content of React 16. It is not the la...

Use CSS to draw a file upload pattern

As shown below, if it were you, how would you ach...

Detailed Tutorial on Installing MySQL 5.7 on RedHat 6.5

RedHat6.5 installation MySQL5.7 tutorial sharing,...

Vue implements countdown function

This article example shares the specific code of ...

Detailed explanation of Vue mixin

Table of contents Local Mixin Global Mixins Summa...

The difference between where and on in MySQL and when to use them

When I was writing join table queries before, I a...

Automatically build and deploy using Docker+Jenkins

This article introduces Docker+Jenkins automatic ...

js to realize simple shopping cart function

This article example shares the specific code of ...

W3C Tutorial (1): Understanding W3C

W3C, an organization founded in 1994, aims to unl...

How to understand the difference between ref toRef and toRefs in Vue3

Table of contents 1. Basics 1.ref 2. toRef 3. toR...

Vue3 uses axios interceptor to print front-end logs

Table of contents 1. Introduction 2. Use axios in...