How to solve 1058 error when mysql starts service _ MySQL

Source: Internet
Author: User
How to solve 1058 error in mysql startup service: bitsCN.com studies a framework today. when the database uses mysql, 1058 error is reported when the mysql service is started, for example.


I tried the same solution after searching for the Internet for a long time. I tried it again and it didn't work (it was not valid only for problems that occurred when I started the local service ). The solution is as follows :,

New, but cannot start.

Solution:

◆ 1. run
D:/mysql/bin> mysqld-nt-remove

Service successfully removed.

D:/mysql/bin> mysqld-nt-install

Service successfully installed.

D:/mysql/bin> net start mysql

MySQL service is starting.

The MySQL service has been started successfully.

◆ 2. check whether my. ini or my. cnf is normal?

Try to Change % SystemRoot %/my. ini to this

[Mysqld]

Basedir = D:/mysql

Datadir = D:/mysql/data

Default-character-set = gbk

[WinMySQLadmin]

Server = D: // mysql/bin/mysqld-nt.exe

◆ 3. copy my. ini and my. cnf to the system disk XX:/WINDOWS/system32. check whether the paths in the configuration environment are consistent.

Later, you can only find the cause by yourself. since the error message is displayed: the cause may be that the device has been disabled or is not started. On the service property page, you can see this:


It turns out that this configuration service was disabled unexpectedly last time.

Start the service. It is best to restart the machine. otherwise, mysql services may be started, and services may not be disabled.

Well, this is my problem and solution, and I hope it will be useful to you. BitsCN.com

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.