Computer Hope

Hardware => Hardware => Topic started by: mac_sak on February 25, 2012, 05:01:41 AM

Title: MySql Service is stops automatically?
Post by: mac_sak on February 25, 2012, 05:01:41 AM
In my Windows Server 2003 The MySql Services automatically stops. MySql version 5.5.11 . Why it stops automatically.  In my LAN we use local web application . This application run based on Mysql , When its services stops the application can not run .  How to avoid this problem.
Title: Re: MySql Service is stops automatically?
Post by: Geek-9pm on February 26, 2012, 12:16:26 AM
Check the error log.
Quote
C:\> "C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld"
          --install MySQL --defaults-file=C:\my-opts.cnf
Here, the default service name (MySQL) is given after the --install option. If no --defaults-file option had been given, this command would have the effect of causing the server to read the [mysqld] group from the standard option files. However, because the --defaults-file option is present, the server reads options from the [mysqld] option group, and only from the named file.

You can also specify options as Start parameters in the Windows Services utility before you start the MySQL service.

Once a MySQL server has been installed as a service, Windows starts the service automatically whenever Windows starts. The service also can be started immediately from the Services utility, or by using a NET START MySQL command. The NET command is not case sensitive.

When run as a service, mysqld has no access to a console window, so no messages can be seen there. If mysqld does not start, check the error log to see whether the server wrote any messages there to indicate the cause of the problem. The error log is located in the MySQL data directory (for example, C:\Program Files\MySQL\MySQL Server 5.1\data). It is the file with a suffix of .err.

When a MySQL server has been installed as a service, and the service is running, Windows stops the service automatically when Windows shuts down. The server also can be stopped manually by using the Services utility, the NET STOP MySQL command, or the mysqladmin shutdown command.

You also have the choice of installing the server as a manual service if you do not wish for the service to be started automatically during the boot process. To do this, use the --install-manual option rather than the --install option:

C:\> "C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld" --install-manual

To remove a server that is installed as a service, first stop it if it is running by executing NET STOP MySQL. Then use the --remove option to remove it:
...
http://dev.mysql.com/doc/refman/5.1/en/windows-start-service.html