The MySQL service on the local computer is stopped after it is started. Some services will be automated when they are not used by other services or programs, and other mysql services

Source: Internet
Author: User

The MySQL service on the local computer is stopped after it is started. Some services will be automated when they are not used by other services or programs, and other mysql services

Re-install the MySQL database. Due to the sloppy installation, all the way to next (in fact, strict configuration is required in some places and I forgot to pay attention to it), it is a lot of trouble now.

Error message:

The MySQL service on the local computer is stopped after it is started. Some services are automatically used when they are not used by other services or programs.

I re-download the Community edition mysql-installer-community-5.6.31.0 on the MySQL official website, this version is free of charge.

Run the windows Service as a system user. Note: In Windows, the MySQL service name is mysql57. No longer mysql

Solution:

1. First, you need to delete the original service

(Mysql is your service name, which can be customized by yourself.
This command needs to run in the bin directory under the mysql installation directory)

Mysqld -- remove mysql

2. In the root directory of mysql, clear the data directory.

(If there is no data directory, create an empty directory named data !)

3. Run the following command:

Mysqld -- install mysql -- defaults-file = C: \ Program Files \ MySQL \ my. ini

C: \ Program Files \ MySQL, and change the path to your own! This is the mysql service registration!

4. Run the startup service command as an administrator:

Net start mysql57

Additional: View logs and view password settings:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.