MySQL service cannot be started in Windows-error Summary

Source: Internet
Author: User

Why cannot I start MySql in windows?
1. the MySQL configuration file is set incorrectly.
A. First, find the MySQL configuration file my. ini.
If the service is started using the specified configuration file, modify it to the corresponding file (the file location is viewed from the service attributes in the control panel)
B. Check whether the directories corresponding to the basedir and datadir parameters exist, for example:
Basedir = D:/MySQL/
Datadir = D:/MySQL/data/
2. Check whether the MySQL directory has read and write permissions on the System user files (generally, the MySQL service is started by the System user)
3. Check whether MySQL port 3306 is in use. If it is in use, modify the port parameters in the my. ini configuration file and change the port to another value.
4. Others
The MySQL database file is damaged.

Appendix:
1. Use commands in Windows to start the MySQL Service
1. Run cmd to enter the console.
2. Net start [MySQL service name], for example:
Net start MySQL
Net start mysql_cy
(If multiple MySQL instances are installed, you can start multiple MySQL instances)

Ii. Use commands in Windows to stop MySQL services
Net stop MySQL
Net stop mysql_cy

(You can also run the command in the. BAT file)

Iii. How to Find the MySQL installation location and data storage location based on the MySQL service name
1. Go to the Windows System Management Service
2. Locate the MySQL service by name and double-click the MySQL service. The service attribute window is displayed.
3. The "executable file path" of the attribute is displayed (example ):
D: \ mysql \ bin \ mysqld-nt defaults-file = D: \ mysql \ My. INI MySQL, where defaults-file specifies the location of the parameter file. If this parameter is not available, generally my. the INI parameter file is in the Windows System directory or MySQL directory. you can find the storage location of Mysql Data in the configuration of ini.

========================================================== ==============================================

MySQL cannot be started and cannot be stopped
2333 times read

Recently, MySQL on Windows 2003 experienced a failure in connecting to the database when it was running normally many times. This problem occurs when it was unable to connect to the database or stop or restart mysql. Restarting the database also did not work, since every time we try various methods, we have never studied them in depth. Next time, we will summarize the diagram and fault phenomena. This article first lists common solutions.

1. Confirm that MySQL is configured and correct
Reconfiguration

If you re-install MySQL, make sure that the installed MySQL has been configured for the first time. Otherwise, my. INI file, configuration method, you can select at the last step of installation, now configure MySQL, or run the MySQL Configuration Wizard in the program group. After configuration, make sure that the [mysqld] field in the my. ini file contains at least the basedir installation directory and datadir database path.

Before configuration, if you have already configured MySQL, You can first execute remove instance in the MySQL wizard and then reconfigure it.

Overwrite data table

The default MySQL database is installed under my document. Therefore, if your database directory is in another path, you can stop MySQL and then cut the database to another path, copy the data table to the same directory.

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 command c: \ Program Files \ mysql \ bin \ mysqladmin-u root-P shutdown 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

1. If you have been running OK all the time before, please first follow the above "cannot start" solution to execute a look.
2. 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.

3. Check MySQL Directory Permissions
4. 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.

5. 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.

6. 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

Source: http://www.discuz.net/home.php? MoD = Space & uid = 988904 & Do = Blog & id = 88432

========================================================== ====================================

MySQL cannot be started (08:18:40 ).
After the MySQL service is started, the system prompts: the MySQL service cannot be started on the local computer. Error 1067: the process was unexpectedly terminated.
This service is started -- set -- control panel -- Management Tools -- in the service
Solution 1: copy the my-***. inf file in the MySQL directory to the Windows directory of the system. Change the file name to my. INF.

Then add similar code in the [mysqld] Code area:

# Set basedir to installation path, e.g., C:/MySQL
# Set it to the MySQL installation directory
Basedir = D:/program files/mysql-5.0.45-win32
# Set datadir to location of data directory,
# E.g., C:/MySQL/data or D:/mydata/Data
# Set it to the MySQL DATA DIRECTORY
Datadir = D:/program files/mysql-5.0.45-win32/Data

Solution 2: MySQL 1067
The error is as follows:

1. Run winmysqladmin to generate the my. ini file.
2. Start MySQL service with mysqld-install
3. Net start MySQL startup MySQL service display normal
When the mysql-u root-P connection is used, an error indicating that the server has not been started is reported. Check the server service. It is true that the MySQL service has not been started. If the MySQL service is manually started, a 1067 error is generated and the MySQL service has been re-installed several times, the error persists. Check that all configurations are correct.

My system environment is win2003 MySQL 4.0.12.
Solution: Copy my. ini generated by winmysqladmin to c: \ windows \ and start MySQL.
This has not been tried: in fact, you do not need to reconfigure as long as you click mysql.exe in the/bin directory in turn

Mysqld.exe

Mysqld-nt.exe

Winmysqladmin.exe

The prompt box appears, and then the cancle is dropped.

Then click winmysqladmin.exe and select start service on the small icon in the lower right corner.

In this way, the INI file is automatically restored.
1. re-install the program. You may need to install the program as an administrator, that is, your original user name or VIP account when buying a machine; 2. The memory is small, resulting in insufficient space-time running or error. Add the root machine sub-memory (M or M may be enough, not expensive) or increase the capacity of the virtual memory to m; 3. Check whether the space of the installed drive letter is not large enough, right-click to check whether at least 15% of the remaining space is left. 4. Check whether the program containing the English letter in the service is disabled, and right-click to select automatic or enabled; 5. log out or restart when an error occurs during installation. 6. Where is the software incompatible with the operating system or hardware, or the operating system lacks important files.

MySQL service cannot be started on the local computer. Error 1067: Unexpected Process Termination

This is generally because the configuration of the my. ini file is incorrect,

Find the my. ini file in the Windows directory, if you haven't copied the my-medium.ini In the MySQL installation directory to C: \ WINDOWS \ My. ini to restart the service.

Source: http://blog.sina.com.cn/s/blog_4ce225060100d6ww.html

========================================================== ========================================================== ==============

How to solve the problem that MySQL service cannot start

The solution is as follows:

Find the my. ini file in the system directory (which should be verified later in the Windows directory) and edit the content (if this file is not available ).
), Including at least two basic configurations: basedir and datadir.
[Mysqld]
# Set basedir to installation path, e.g., C:/MySQL
# Set it to the MySQL installation directory
Basedir = D:/www/webserver/MySQL
# Set datadir to location of data directory,
# E.g., C:/MySQL/data or D:/mydata/Data
# Set it to the MySQL DATA DIRECTORY
Datadir = D:/www/webserver/MySQL/Data

------------------------------------
Other solutions found online
Several solutions to errors when starting the MySQL Service

1
After installing MySQL, change the root password and use
Net startmysql
I encountered this problem at startup.
C: \ mysql \ bin \ mysqladmin-u root-P Shutdown
Net start MySQL does not have this error prompt!

*************
2
MySQL error 1067
Q: I encountered a 1067 error in MySQL.

Error message:
A system error has occurred.
System Error 1067 has occurred.
The process terminated unexpectedly.

A: The solution on my machine is:
Modify % WinDir % \ My. ini and add
[Mysqld]
# Set basedir to the MySQL installation path
Basedir = D: \ Program \ tools \ mysql
Datadir = D: \ Program \ tools \ mysql \ data

*************
3
It's done !!!
It seems like this ......
The mysql_install_db script only needs to be run once during the first installation, and then it does not need to be run any more.
This is not the case. I copied mysql. server to/etc/rc. d/init. d/and run chkconfig mysql. Ser.
Server. At this point, the MySQL server is automatically started every time it is started. You only need to set the path and enter MySQL on the command line.
Yes!
It seems that the process of exploration is really painful. It has been suffering me for several days ......

*************
4
Q: I encountered a 1067 error in MySQL.

Error message:

A system error has occurred.
System Error 1067 has occurred.
The process terminated unexpectedly.

A:
Solution:

1. Check whether your MySQL directory has the System user permission.
2. delete your % WINDOWS %/My. ini file.
3. Check whether your C:/My. CNF file is correctly configured.

*************
5
[☆☆☆Mysql summary ☆☆☆]
The default installation directory of MySQL is C: mysql. After the installation is complete, there is no message indicating that the installation is complete. Click Finish.
And then exit. If you want to install it in another directory, we recommend that you first install it in C: MySQL, and then
Move the entire directory to the desired place. For example, after moving to D: MySQL, edit D: mysqlmy-examp.
Le. CNF (*. CNF files will be registered as speeddial files in Windows 2000, in the Resource Manager
Unable to operate, use the command line to start notepad editing, such as running notepadd: mysqlmy-example.cnf,
However, this file is in the format of a text file in the Unix system. You can use the write
Edit,
Or use write to open and save it once, and then use NotePad to edit it .) Find a line in basedir and remove the previous line.
"#", And change the following path to the moved directory (the directory separator should use a slash instead of a backslash ),
Save it as: C: My. CNF
If a MySQL instance started in service mode is stopped using net stop MySQL, an error message is displayed, for example:

C:> net stop MySQL
The MySQL service is stopping.
System error.
The system has a 1067 error.
The process stops unexpectedly.
The MySQL service has been stopped successfully.
This does not matter. MySQL has indeed stopped. However, if you do not want to see any error messages
You can use the following command to stop:
C:> mysqlbinmysqladmin-u root Shutdown
If no message is displayed, MySQL has been stopped successfully.
It should be noted that although MySQL is known to be simple to install and easy to use, it is a database management system based on SQL.
So if you are not very familiar with SQL, you may not be able to do anything with it.

**************
6
Solution to MySQL service failure
MySQL service cannot be started

My operating system is Win XP
No matter what version of MySQL is installed, an error will be reported midway through the MySQL service started in the management tool.
Content: unable to start MySQL service on local computer error 1067: Process aborted unexpectedly

The solution is as follows:

Find the my. ini file in the system directory (which should be verified later in the Windows directory) and edit the content (if this file is not available ).
), Including at least two basic configurations: basedir and datadir.
[Mysqld]
# Set basedir to installation path, e.g., C:/MySQL
# Set it to the MySQL installation directory
Basedir = D:/www/webserver/MySQL
# Set datadir to location of data directory,
# E.g., C:/MySQL/data or D:/mydata/Data
# Set it to the MySQL DATA DIRECTORY
Datadir = D:/www/webserver/MySQL/Data

In addition, you need an idea
[Winmysqladmin]
Server = D:/www/webserver/MySQL/bin/mysqld-nt.exe
User = root
Password = XXXXXXXX
# The above is the configuration for setting winmysqladmin
[Client]
User = root
Password = XXXXXXXX

Hehe ~ Solved

**************
7
Just completed MySQL "keyword 1067 error 』
When I was depressed, I didn't even think that an error would occur when installing mysql. The error code is that 1067 has been installed and uninstalled several times.
No, and some Disabled Services are turned on, but still not. Finally, I solved the problem as follows:

Find my. ini in c: \ windows, delete it, and then start winmysqladmin.exe to configure MySQL,
Save my. ini and start MySQL.

***************
8
MySQL error 1067: Unexpected Process Termination
This problem plagued the morning and was very depressing! I have never met MySQL before, but now
Zhuang has a problem with this high version. I still have the same problem with the low version I installed (the most important thing is the operation system ).
). When MySQL is started in Windows 1067, "error:
Unexpected termination "!

I felt the problem was in the configuration file, so I re-wrote my. ini, And the startup was still the same. I checked it on Google.
Failed to find, crash status! At this moment, I was very enlightened by an expert. Is there any INI file?
Put it in the Windows directory. I copy it from the Windows directory of my directory to the Windows directory of the system.
Dynamic service, OK !!!

I am not satisfied. Why is it different? My other machine is installed with version 4.0.18, and its my. I
Ni is stored in the Windows directory under the user directory and runs normally. I am a bit confused and often
After solving the problem, I seldom think about it, so I want to give up now. If I don't get the answer, I want
This is basically impossible to solve the problem :)

Source: http://www.blogjava.net/javainthink/archive/2006/11/03/78890.html

Reprinted please indicate the source:
By wy811007
Source: http://wy811007.cnblogs.com
The copyright of this article is shared by the author and the blog Park. You are welcome to repost this article. However, you must retain this statement without the author's consent and provide a clear link to the original article on the article page. Otherwise, you will be held legally liable.

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.