Tag Info

Hot answers tagged

5

The slickest way to shutdown mysql when it does that is simply to run mysqladmin -uroot -p -h127.0.0.1 --protocol=tcp shutdown Here is why: The mysql service file (/etc/init.d/mysql) relies on the presence of the socket file. Historically speaking, going way back to MySQL 4.0, the socket file sometimes disappears inexplicably. This hampers a standard ...


5

Think of it this way: the database is the set of physical files, on disk. It's a completely passive "thing". It doesn't "do" anything on its own - it's just data. the instance is the software/processes (with its memory) that manages the database. It's the active part. It's what clients connect to, it's what processes SQL, reads data, updates it, maintains ...


5

You don't have to be fancy/worried or scared when you are restarting sql server. Just make sure that you dont have any long running transactions. Best is to restart sql server using console or shutdown command during a low/minimum activity period also called maintenance window to minimize impact on your business. If you have any DR setup and you dont want ...


2

Not exactly when it comes to shutting down and preventing DB corruption. MS SQL Server is a very mature product and the odds of causing a corruption issue by a simple 'shutdown' would be a edge scenario. You're much more likely to cause corruption by not running CHECK DB or having checksum validation set on your DB. Perhaps having external tools ...


2

When you issue service mysql stop, a lot more happens than just cutting off DB Connectivity. The link in the comment from @ethrbunny already explains what things happens. I would like to focus on one particular aspect: The InnoDB Buffer Pool. InnoDB has to flush the InnoDB Buffer Pool's dirty pages. If you want to know how much, run this before shutdown: ...


2

I ran into this problem on a managed system. Took me a while to spot the very obvious cause, which is that the system as a whole had gone down for scheduled maintenance -- I guess because an updated kernel package was available. So obvious! The fix was of course to change the system configuration so that MySQL was automatically started when the system ...


2

Linux's Viewpoint You should run this Linux command history | grep mysqladmin This will let you see if anyone ran a shutdown from within the server. Note that this will not let you see remote mysqladmin shutdowns. Perhaps running tcpdump and locating the word mysqladmin or shutdown might help. MySQL's Viewpoint Shutdown commands do not exist from ...


1

DISCLAIMER : Not a MacOS user That is an alternative way. This shutdown method can be done in MacOS, Linux, Windows, any platform MySQL is supported in. I actually prefer your mysqladmin method for a reason... In Linux, I have seen the mysql.sock (the socket file) file just up and disappear without warning. The standard way to shutdown mysql in Linux is ...


1

One perfect example why root access even for admins is bad. Maintaining a sudoers file and a centralized database of privileged users and groups(LDAP for example) would help solving problems like this. One note: the wrongdoer might well be a cronjob. I'd check that.


1

For security concern who executed what queries at what time etc.. you should use "Audit Plugins". You can refer my existing answer here http://dba.stackexchange.com/a/62477/6037 Ofcourse you can find "mysqladmin" using shell histories or tracing "General/Error log" of MySQL server. For example if you have General log enabled either in a "Table" or "File" ...


1

Check the secure log in the event it was run via a sudo service call sudo grep mysql /var/log/secure Check to see if there's any mysql related stuff going on in cronjobs sudo grep mysql /var/log/cron Check shell histories for mysqladmin calls cd /home; for u in *: do; sudo grep mysql /home/$u/.bash_history; done Check with people you know that either ...


1

A shutdown is already in progress. You can either Wait Login using su - oracle and then sqlplus / as sysdba and issue the command shutdown abort if that's what you really want.


1

It sounds as if your question is less about "how to" shut down MySQL and more about why yours is shutting down so slowly. In my answer to a similar question, I offered some suggestions for a smooth restart, which help by reducing the amount of activity that has to happen after you request that MySQL begin the shutdown process. If you are not a frequent ...



Only top voted, non community-wiki answers of a minimum length are eligible