Windows MySQL failed to start service did not report any errors

Source: Internet
Author: User
Tags mysql version

I believe many people have encountered the installation of MySQL when there are a variety of problems, today's small compilation to solve the MySQL service window under the circumstances do not report any errors can not start the problem. The MySQL version used in this article is version 5.7 or higher, and the workaround:

1. Note 1: you will not be able to create a data folder yourself after you have finished configuring My.ini (your own MySQL profile) on the online tutorial.

  1. 2

    A lot of people, including the landlord is also, configure the DataDir properties after the folder path to store data did not ah, build a chant. Wrong is wrong here, can not build, you build your own data folder how can you have MySQL boot required table structure configuration file?

  2. 3

    Issue 2: when using net start mSQL, "The service report has no errors".

    After installing the MySQL service, I can't wait to open the MySQL service, and there is no data directory by default in mysql5.7 or above, that is, there is no initialization service. You need to initialize MySQL before you can start the service, otherwise it will be reported that "the service did not report any errors", start failure.

    The correct step is to execute the mysqld--initialize-insecure (without root password, recommended) command in the MySQL bin directory first, the first time the command will wait a little longer, and the console does not have any return results. You can see the MySQL root directory will be more than a data folder, inside a heap of files.

  3. 4

    Issue 3: do not first execute mysqld--initialize-insecure (not set root password, recommended), but first execute net start MySQL, startup failure, MySQL will automatically create a data folder, and initialize some files inside, the data folder is not deleted when executing mysqld-initialize again. Error messages such as:

  4. 5

    The solution at this point is to delete the data folder, then execute Mysqld-initializemysqld--initialize-insecure (not set root password, recommended), and then start MySQL.

  5. 6

    Issue 4:MySQL installed, can happily input "MySQL or mysql-hlocalhost-uroot-p" a return car, incredibly did not go in, out of an "ERROR 1045 Access denied for user ' xxx ' NO "

  6. 7

    The reason is that the new version of MySQL for security, the default is to have a password.

    Workaround:

    MySQL default installation will have password generation, password files written directly in the Log-error log file (in version 5.6 is placed in the Root/.mysql_secret file, more covert, unfamiliar words may be confused), MySQL5.7 after the installation, the first time you start, a random password is produced in the root directory, with the file name. Mysql_secret

    Login with a random password to log in, and then change the password with the following command

    SET PASSWORD = PASSWORD (' new PASSWORD ');

Windows MySQL failed to start service did not report any errors

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.