The mysql service cannot start the solution

  • 2020-05-13 03:41:33
  • OfStack

Recently on Windows 2003 MySQL appeared unable to connect to database failure many times during normal operation, is unable to connect to the database, also can't stop MySQL or restart MYSQL, restart the machine also has no effect, because every time is caocao to try a variety of methods that can be done 1 straight no in-depth study, the next 1 set the figure under the system of induction 1 and fault phenomena. This article begins with a list of common solutions.

The following error message appears when starting the mysql service (the MySQL service could not be started) :
The local computer could not start the mysql service.
Error 1067: the process terminated unexpectedly.
Solutions:
run
 
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 restart installation 1
 
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 was launched successfully.

1. Make sure MYSQL is configured and correct
To reconfigure
If the MYSQL is reinstalled, please make sure that the MYSQL after installation has been configured for the first time, otherwise the my.ini file will be missing. The configuration method can be selected at the last step of installation, and now start configuring MYSQL, or run the MYSQL configuration wizard in the program group. Once the configuration is complete, make sure there is at least an basedir installation directory path and an datadir database path under the [mysqld] field in the my.ini file.
If you already have an MySQL configuration before you configure it, you can execute REMOVE INSTANCE once in the MYSQL wizard and then reconfigure it.
Overwrite data sheet
The default MYSQL database will be installed under My Document, so if your database directory is in a different path, you can stop MYSQL, then cut the database to a different path, and then copy the relevant data table into the same directory.
If the MYSQL data table USES a different account, you will also need to create an account at MYSQL or overwrite it with the original MYSQL data table (make sure the previous MSYQL data table is not corrupted).
Resolution unable to start
Common solutions when MYSQL cannot be started:
A, close MYSQL by using the command C:\Program files\mysql\bin\ mysqladmin-root-p shutdown
B, then on the cmd command line, launch mysql by executing net start mysql.

2. 1067 common solutions to errors
The fault phenomenon
If a 1067 error occurs while stopping MYSQL (net stop mysql) or starting MYSQL, the error message "MySql service is stopping... System error (A system error has occurred.)... System 1067 error (System error 1067 has occurred.), process unexpectedly terminated (The process terminated unexpectedly.), etc.
Common solutions
If you ran OK directly before 1, follow the "unable to start" solution above to have a look.
If you have done Remove Instance operation, after the reconstruction, 1 must check whether datadir in
.ini file has been restored. If the database under this address does not exist, 1067 error will be reported. You just need to modify it to the real database directory address and start it manually.
Check the MYSQL directory permissions
Check if there is an basedir installation directory path and an datadir database path under the [mysqld] field in the my.ini file. my.ini may need to appear in two places.
Sometimes deleting %windir%/ my.ini file and then reconfiguring it can also be solved. After reconfiguration, check whether there is my.ini file under Windir directory under 1.
If is Linux environment, try to under 1 mysql. server copy to/etc/rc d/init d /, and then run chkconfig mysql. server, after can be set on the command line PATH, use the command execution mysql startup.

3. Unable to start MYSQL caused by illegal shutdown
If because of illegal shutdown causes such as MYSQL cannot start or start a problem, it is best to use reinstall or confirmation is OK MYSQL data table and ibdata1, mysql. pid, ib_logfile0 file cover, the luck tried met many times this kind of situation, is the original MYSQL table has a problem, always cannot be started, but it is ok to replace ChengXinBiao.

4. Reinstall MYSQL
When problems are found with MYSQL, the most convenient method is to uninstall mysql first and then reinstall and reconfigure it. The specific method is as follows:
1. Uninstall MYSQL and clean up the installation directory and the my.ini files in the Windows directory.
2. Check if there is still mysql process in the task manager. If there is, you can kill mysqld.
3. In the cmd command window, execute: sc delete mysql, which is the clean registration service command.
3. Reinstall mysql
If this problem occurs after the security setting, it may be caused by the password policy and other problems when mysql is running with low permissions. You can see that the startup user of mysql will have a lower password and then set it in the service item.

Related articles: