Mysql Service cannot start solution _mysql

Source: Internet
Author: User
MySQL recently on Windows 2003 has many times the normal operation can not connect to the database failure, the phenomenon is unable to connect to the database, and can not stop MySQL or restart MySQL, restart the machine also has no effect, because each time is a cursory attempt to do a variety of methods to fix it, has not been in-depth research, The next time will be the diagram and fault phenomenon system summed up. This article first lists the common solutions.

The MySQL service starts with the following error message (the MySQL service cannot start):
The local computer could not start the MySQL service.
Error 1067: Process terminated unexpectedly.
Solution
Run
Copy Code code as follows:

Cd C:\Program files\mysql\mysql Server 5.1\bin\
C:\Program files\mysql\mysql Server 5.1\bin >mysqld–remove
Service successfully removed

Now remove it and reboot and install it.
Copy Code code as follows:

C:\Program files\mysql\mysql Server 5.1\bin >mysqld–install
Service successfully installed.
C:\Program files\mysql\mysql Server 5.1\bin >net start MySQL

The MySQL service is starting.
The MySQL service has started successfully.

First, verify that MySQL is configured and correct
Re-configure
If you are reinstalling MySQL, please confirm that after the installation of MySQL after the first configuration, otherwise will be missing My.ini files, configuration method, can be installed to the last step of the selection, now start to configure MySQL, or in the program group run the MySQL Configuration Wizard. After the configuration is complete, make sure that there are at least Basedir installation directory paths and DataDir database paths under the [Mysqld] field in the My.ini file.
Prior to configuration, if you already have a MySQL configuration, you can perform a remove INSTANCE in the MySQL wizard before you reconfigure it.
Overwrite data table
The default MySQL database is installed under my document, so if your database directory is in other paths, you can stop MySQL first, then cut the database to another path, and then copy the relevant datasheet into the same directory.
If the MySQL datasheet uses a different account, you will also need to create an account in MySQL, or use the original MySQL datasheet to overwrite it (you need to confirm that the MSYQL datasheet was undamaged).
resolve failed to start
Common workaround when you encounter a failure to start MySQL:
A, first use the command C:\Program files\mysql\bin\mysqladmin-u root-p shutdown to close MySQL
B, and then under the cmd command line, execute net start MySQL to start MySQL.

two, 1067 error common solution
Failure Phenomenon
If there is a 1067 error while stopping MySQL (net stop MySQL) or starting MySQL, the error message "MySQL service is stopping ... System error (A Systems error has occurred ...). System error 1067 has occurred., the process terminates unexpectedly (the processes terminated unexpectedly.).
Common Solutions
If you have been running OK before, please follow the "Cannot start" solution above to perform a look.
If you have a remove instance operation, after rebuilding again, be sure to check the My.ini file DataDir has been restored, if the database does not exist under the address, will also report 1067 errors, only need to modify into a real database directory address, and then manually start.
Check MySQL directory permissions
Check to see if there is a Basedir installation directory path and DATADIR database path under the [Mysqld] field in the My.ini file, My.ini may need to appear in two places, MySQL's installation directory and Windows directory (assuming it is a Windows environment), Have to check.
Sometimes delete%windir%/my.ini files and then reconfigure can also be resolved, once again configured to check the windir directory whether there are my.ini files, and sometimes the installation directory under the latest My.ini copies of the past cover can also solve the problem.
If it is a Linux environment, try to copy Mysql.server to/etc/rc.d/init.d/, then run Chkconfig mysql.server, then you can set path on the command line and use the command to perform MySQL boot.

third, illegal shutdown caused by MySQL can not start the problem
If it is because of illegal shutdown and other reasons MySQL can not start or start a problem, it is best to use the reinstall or confirm that the MySQL data table is OK and ibdata1, Mysql.pid, IB_LOGFILE0, and other documents to cover, the days have encountered many times this situation, is the original MySQL table has a problem, always can not start, but the new table can be changed.

four, reload MySQL
When you find a problem with MySQL, the most convenient way is to uninstall the MySQL first, and then reinstall the reconfiguration, specific methods are as follows:
1, uninstall MySQL, clean out the installation directory and Windows directory My.ini files.
2, check the Task Manager whether there is a MySQL process, if there is, you can kill Mysqld.exe, or first kill and then uninstall can also.
3, in the cmd command window, execution: SC delete mysql, the command is the cleaning up Registration Service command.
3. Re-install MySQL
If this problem occurs after the security settings, it may be because the MySQL to run with low privileges because of password policy issues, and so on, we look malicious will MySQL's startup user under the password, and then set in the service item can be.
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.