MySQL cannot be started in Windows, and WindowsMySQL cannot be started.

Source: Internet
Author: User

MySQL cannot be started in Windows, and WindowsMySQL cannot be started.
Problem description:From MySQL 5.7 on the internet, execute start mysqld in the bin directory. the pop-up cmd window will disappear, and you cannot see what the error is. Mysqld -- install has installed the service and cannot be started.Procedure:1. Open the Event Viewer to check the error message. 2. Check the error message online. It indicates that mysql_install_db needs to be executed for linux and user needs to be copied for Windows. frm user. MYD and user. MYI3, however, http://serverfault.com/questions/291126/mysql-fatal-error-cant-open-and-lock-privilege-tables-table-mysql-host-doe is recommended heremysqld --initializeRun the following error: C: \ Program Files \ MySQL Server 5.7 \ bin> mysqld -- initialize2016-12-20T04: 33: 22.298853Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. please use -- explicit_defaults_for_timestamp server option (see documentation for more details ). 2016-12-20T04: 33: 22.298853Z 0 [Warning] 'No _ ZERO_DATE ', 'no _ ZERO_IN_DATE' and 'error _ FOR_DIVISION_BY_ZERO 'SQL modes shocould be used with stri Ct mode. they willbe merged with strict mode in a future release.2016-12-20T04: 33: 22.298853Z 0 [Warning] 'No _ AUTO_CREATE_USER 'SQL mode was not set.2016-12-20T04: 33: 22.303853Z 0 [ERROR] -- initialize specified but the data directory has files in it. aborting.2016-12-20T04: 33: 22.304853Z 0 [ERROR] Aborting 4. Because all the test data is used, I directly Delete the datadir (my D: \ MysqlData) folder. Execute againmysqld --initializeC: \ Program Files \ MySQL Server 5.7 \ bin> mysqld -- initialize 5. Start the Service (if the service is not installed, run mysqld -- install first) C: \ Program Files \ MySQL Server 5.7 \ bin> net start mysqlMySQL service is being started. the MySQL service has been started successfully. This method is easier than copying a user. file. However, you need to clear all the data, which is suitable for use in your own testing environment.

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.