If reproduced, please respect personal labor, be sure to indicate the original source: (http://blog.csdn.net/iihero/archive/2010/05/13/5585039.aspx)
This article is original to iihero @ csdn.
I mentioned my in the previous article. INI/CNF: C:/Windows/My. CNF-> C:/Windows/My. ini-> C:/My. CNF-> C:/My. ini-> $ installdir/My. ini. (% Mysql_home %/My. INI)->--defaults-extra-file=path,
(In Linux,/etc/My. CNF->/etc/MySQL/My. CNF-> sysconfdir/My. CNF-> $ mysql_home/My. CNF->--defaults-extra-file->~/my.cnf
If the original configuration file cannot be found in these locations.
So it must be placed in a certain position. When the MySQL program is up, how to search for this so-called my. ini.
In Linux, a PS-Ef command can find the final physical location of my. CNF.
In Windows, the tasklist command cannot be found. Only the mysqld or MySQL-nt process names can be seen, and the command line parameters cannot be found. You may not be able to directly view services. MSC.
At this time, you can use a dedicated tool.
1. If you have used Unix-like command line tools such as mks tools, you can locate them using PS-Ef | grep MySQL.
For example:
D:/> PS-Ef | grep MySQL
System 1112 764 0 04:56:49 conin $ D:/mysql-5.0.9-beta-win32/bin/mysqld-NT-- Defaults-file = D:/mysql-5.0.9-beta-win32/bin/My. iniMysql5
2. If there is no tool as prompted, you can also download a windbg for Windows (this is a free super debug tool provided by Microsoft), set its installation path to path, and then
Run the tlist-v | findstr MySQL command. For example:
D:/> tlist-v | findstr MySQL
0 32 3240 lele.exe title: console-findstr MySQL
0 32 1112 mysqld-nt.exe SVCs: mysql5
Command line:D:/mysql-5.0.9-beta-win32/bin/mysqld-NT -- defaults-file = D:/mysql-5.0.9-beta-win32/bin/My. ini mysql5
Command Line: findstr MySQL
3. In the end, if you are not sure about the command line, you can use the graphic interface to get the next processexplore-nt.zip
Http://technet.microsoft.com/en-us/sysinternals --> process Explorer
The Process Manager that runs this graphic interface,
Select view-> select columns and select image path and command line in process image.
Then you can search for mysql-nt.exe in the progress bar and find the complete parameter information in its command, which contains the specified information about my. ini.
The simpler method is:
Directly from find-> Find handle, and then input MySQL,
In this way, select one of the results and close this window. The complete information of the process is displayed in properties in the process menu:
The full text is complete.
Finally, it is suggested that someone may want to use mingw + msys or cygwin to obtain detailed information about the process. Unfortunately, they can only query the process information in the system, but cannot find the process information of the Windows system.