Analysis and Solution for failure to start mysql

Source: Internet
Author: User
This article introduces some strange causes for analysis and solutions to these problems when using the mysql server. For more information, see.

This article introduces some strange causes for analysis and solutions to these problems when using the mysql server. For more information, see.

Because of the relationship between the program to be debugged, the settings are modified from the background and set
Join_buffer_size = 512 k
After the result is saved, mysql cannot be connected immediately, and lu-restart and mysql-restart cannot be restarted.

Operation successful!
LuManager cannot connect to MySQL. Use SSH to log on to the server and check whether the MySQL database has been started.
If the startup is successful, check whether the connection password in the/usr/local/LuManager/Conf/config. file is correct.
If not, log on to the server using SSH and run the mysql-restart command.


The/etc/my. cnf file is modified back to the original settings in the background.
The password in config. php is also correct.

Later, I checked the log and found that:
120215 09:59:57 mysqld_safe mysqld from pid file/home/mysql_data/localhost. localdomain. pid ended
120215 10:00:01 mysqld_safe Starting mysqld daemon with databases from/home/mysql_data
Unknown suffix 'B' used for variable 'query _ cache_size '(value '0b ')
120215 10:00:01 [ERROR]/usr/local/mysql/libexec/mysqld: Error while setting value '0b' to 'query _ cache_size'
120215 10:00:01 [ERROR] Aborting

It seems that this error is because query_cache_size was modified to 0B when mysql settings were modified.
The system requires 0 kb.
However, what is the dynamic query_cache_size parameter when I modify it?


Other problems and solutions found on the Internet

If the MYSQL Data Table uses different accounts, you also need to create an account in MYSQL, or directly use the original MYSQL Data Table to overwrite (you need to confirm that the previous MSYQL data table is not damaged ).

Unable to start

When MYSQL cannot be started, see solution:

A. Run the C: Program filesmysqlbinmysqladmin-u root-p shutdown command to disable MYSQL.

B. Execute net start mysql to start mysql under the cmd command line.

Ii. Common Solution to 1067 errors
Fault symptom

If the 1067 error occurs when you stop MYSQL (net stop mysql) or start MYSQL, the error message "MySql service is stopping... system error (A system error has occurred .)... system error 1067 (System error 1067 has occurred .), the process terminated unexpectedly .).

Common solutions

If you have been running OK all the time before, please first follow the above "cannot start" solution to execute a look.
If you have performed the Remove Instance operation, make sure to check my. whether the datadir In the INI file has been restored. If the database does not exist under this address, the system reports error 1067. You only need to change it to the actual database directory address and start it manually.
Check MYSQL Directory Permissions
Check my. whether the basedir installation directory path and datadir database path exist in the [mysqld] field of the INI file, my. ini may need to appear in two places. Check both the MYSQL installation directory and the Windows directory (assuming the windows environment.
Sometimes Delete % windir %/my. the INI file can be re-configured. After re-configuration, check whether my is in the Windir directory. INI file, sometimes the latest my. if you copy the ini file and overwrite it, the problem can be solved.
For a Linux environment, try mysql. server copy to/etc/rc. d/init. d/, and then run chkconfig mysql. then you can set the PATH in the command line and run the command to start mysql.

Iii. MYSQL cannot be started due to illegal Shutdown
If the MYSQL cannot be started because of an illegal shutdown or other reasons, it is recommended to use the mysql data table that is re-installed or confirmed to be OK and ibdata1, mysql. files such as pid and ib_logfile0 are overwritten. tianyuan has tried many times. This is because the original MYSQL table is faulty and cannot be started, but it can be replaced with a new table.

4. reinstall MYSQL
When a problem occurs in MYSQL, the most convenient method is to uninstall mysql and re-configure it. The specific method is as follows:
1. uninstall MYSQL and clear the my. ini files in the installation directory and Windows directory.
2. Check whether the job manager has a mysqlpath. If yes, you can kill mysqld.exe or kill it before uninstalling it.
3. In the cmd command window, run SC delete mysql, which is a command to clean up and register the service.
3. reinstall mysql

MySql cannot be started normally, and an alternative solution to 1053 errors


If a problem occurs, use mysqld-nt install mysqlservice to register the MySql service. Under normal circumstances, the service will automatically start after the machine restarts. However, on some (a few) machines, the service cannot be started normally after the restart, And it is manually started in the service. The prompt is displayed: Error 1053 the service did not respond to the start or control request in time.
In this case, if you use mysqld-nt remove mysqlservice in the command line to uninstall the service, it indicates that the service is successfully uninstalled, but in fact the service still exists in the system. After the service is restarted, it disappears, you can use mysqld-nt install mysqlservice to re-register the service, and everything will return to normal.

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.