Sometimes, MySQL will make your server pain if you have user abusing it. Mick Genie will teach you to identify which MySQL database creating the problem to your server.
Actually MySQL can log all of the those query that taking longer time than certain seconds.
1. Login to the server as root.
2. Open your my.cnf with your editor.
3. In the [mysqld] section, add the line as below.
log-slow-queries = /var/log/mysql-slow.log
long_query_time = 3
this meant that the log will logged to /var/log/mysql-slow.log and the query time is 3 seconds.
4. Save the my.cnf by typing “:wq!” and press enter.
Continue reading Identify slow MySQL query
Do you ever try to reboot or shut down a server/PC within a network?
The mystery from Microsoft have done if you are running with administrator role, just try to the command as below if you could like to reboot/shutdown.
1. Open command prompt by Press Windows+R and type in cmd.
2. Type in “shutdown /m \\computername /r” if you could like to reboot.
The General format was as below:
shutdown \\computername /l /a /r /t:xx “msg” /y /c
- \\computername: Use this switch to specify the remote computer to shut down. If you omit this parameter, the local computer name is used.
- /l (Note that this is a lowercase “L” character): Use this switch to shut down the local computer
- /a: Use this switch to quit a shutdown operation. You can do this only during the time-out period. If you use this switch, all other parameters are ignored.
- /r: Use this switch to restart the computer instead of fully shutting it down.
- /t:xx: Use this switch to specify the time (in seconds) after which the computer is shut down. The default is 20 seconds.
- “msg“: Use this switch to specify a message during the shutdown process. The maximum number of characters that the message can contain is 127.
- /y: Use this switch to force a “yes” answer to all queries from the computer.
- /c: Use this switch quit all running programs. If you use this switch, Windows forces all programs that are running to quit. The option to save any data that may have changed is ignored. This can result in data loss in any programs for which data is not previously saved.
Within the above description you may force all of the query and etc from the command to reboot/shutdown a server/PC.
Article from: http://support.microsoft.com/kb/317371