Proper way to shutdown MySql

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Proper way to shutdown MySql

Postby russdirks » 25. November 2013 22:54

What is the proper way to shutdown MySql? I'm not running it as a service, so I used the Start/Stop buttons in the Xampp CP 3.2.1, but I noticed the following error message in the MySql log the next time I started :

Code: Select all
131125 13:18:06  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...


I read somewhere (can't find it now, though) that xampp just kills the mysql process, rather than using mysqladmin to do a proper shutdown. Is that true? I guess I need some reassurance that the Stop button in the control panel is not going to cause me problems.
russdirks
 
Posts: 2
Joined: 25. November 2013 22:45
Operating System: Win 7

Re: Proper way to shutdown MySql

Postby JJ_Tagy » 26. November 2013 00:20

From cmd prompt: "mysqladmin shutdown -uroot -p"

It will show as error in control panel, but you can ignore.
JJ_Tagy
 
Posts: 678
Joined: 30. January 2012 13:44
Operating System: Windows 10 Pro x64

Re: Proper way to shutdown MySql

Postby russdirks » 26. November 2013 00:43

So I guess you're confirming that using the Stop button in the control panel is not a good way to shut down MySql?

I'm puzzled why xampp uses that method if it causes problems!
russdirks
 
Posts: 2
Joined: 25. November 2013 22:45
Operating System: Win 7

Re: Proper way to shutdown MySql

Postby JJ_Tagy » 26. November 2013 01:20

I wouldn't say it isn't the way, but to properly send MySQL through a proper shutdown sequence it is a better method. The control panel uses the kill method. I think only recently did it start causing problems.
JJ_Tagy
 
Posts: 678
Joined: 30. January 2012 13:44
Operating System: Windows 10 Pro x64

Re: Proper way to shutdown MySql

Postby Altrea » 26. November 2013 05:42

The default way of stopping the mysql single component is creating issues for all XAMPP 1.8.3-X versions (so all versions including MySQL 5.6.X).

Why XAMPP is using this way is very easy: the recommend shutdown command needs a database permission with SHUTDOWN privileges. This username/password combination could, should and needs to be changeable by the user because of security reasons but:
- we would need to save that password anywhere in the control panel (we don't want that)
or
-the user needs to enter the defined username/password for any shutdown (we don't want that either).

There is an alternative a user can use:
Starting/stopping mysql as windows service uses different commands which (maybe) don't produce such issues.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8286
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 55 guests