Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÔÙ̸mysqlµÄÅäÖÃÎļþmy.ini or my.cnf (Ö®¶þ)

ÈçÈôתÔØ£¬Çë×ðÖظöÈËÀͶ¯£¬Îñ±Ø×¢Ã÷ԭʼ³ö´¦£º(http://blog.csdn.net/iihero/archive/2010/05/13/5585039.aspx)
±¾ÎÄΪiihero@CSDNÔ­´´¡£
ÔÚǰһƪ¶ÌÎÄÀïÌáµ½ÁËmy.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
,
(linuxÏ£¬/etc/my.cnf->/etc/mysql/my.cnf->SYSCONFDIR/my.cnf->$MYSQL_HOME/my.cnf-> --defaults-extra-file->~/my.cnf
Èç¹ûÕ⼸¸öλÖö¼ÕÒ²»µ½ÏàÓ¦Ô­ÅäÖÃÎļþÄØ¡£
ÄÇôһ¶¨ÊǷŵ½Ä³Ò»¸öλÖÃÁË£¬ÔÚmysql³ÌÐòÒѾ­ÆðÀ´µÄÇé¿öÏ£¬ÈçºÎËÑÑ°Õâ¸öËùνµÄmy.ini¡£
ÔÚLinuxÏ£¬Ò»Ìõps -efÃüÁî¾ÍÄÜÕÒµ½×îÖÕʹÓõÄmy.cnfµÄÎïÀíλÖá£
ÔÚwindowsÏ£¬ÄãÓÃtasklistÃüÁîÊÇÕÒ²»³öÀ´µÄ£¬Ö»ÄÜ¿´µ½mysqld»òÕßmysql-nt½ø³ÌÃû£¬ÆäÃüÁîÐвÎÊýÔòÕÒ²»µ½¡£Ö±½Ó²é¿´services.mscҲδ±ØºÃÕÒ¡£
Õâʱºò£¬¿ÉÒÔ½èÖúÓÚרÓù¤¾ßÁË¡£
1. Èç¹ûÄãÓùýMKS toolsÖ®ÀàµÄÀàunixÃüÁîÐй¤¾ß£¬ps -ef | grep mysql¼´¿É¶¨Î»
È磺
d:\>ps -ef | grep mysql
  SYSTEM  1112   764  0 04:56:49 CONIN$  0:00 D:\mysql-5.0.9-beta-win32\bin\mysqld-nt --defaults-file=D:\mysql-5.0.9-beta-win32\bin\my.ini
mysql5
2. Èç¹ûûÓÐ1ËùÌáʾµÄ¹¤¾ß£¬Ä㻹¿ÉÒÔÏÂÔØÒ»¸öWinDbg for windows (ÕâÊÇ΢ÈíÌṩµÄÃâ·Ñ³¬Ç¿debug¹¤¾ß)£¬°ÑËüµÄ°²×°Â·¾¶ÉèÖõ½pathÀïÍ·£¬È»ºó
   ÔËÐÐÃüÁîtlist -v | findstr mysql¼´¿É¡£È磺
d:\>tlist -v | findstr mysql
 0 32 3240 Console.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. ×îºó£¬Èç¹ûÄãʵÔÚ²»Ï²»¶ÃüÁîÐУ¬ÄǾÍÓÃͼÐνçÃæºÃÁË£¬ÏÂÒ»¸öProcessExplore-NT.zip
    http://technet.microsoft.com/en-us/sysinternals
--> Process Explorer
   ÔËÐÐÕâ¸öͼÐνçÃæµÄ½ø³Ì¹ÜÀíÆ÷£¬
  
Ñ¡Ôñview->select columns£¬È»ºóÔÚprocess imageÀïÍ·£¬°ÑImage PathºÍC


Ïà¹ØÎĵµ£º

MySQL 5.1ÍêȫжÔØ

1¡¢¿ØÖÆÃæ°åÀïµÄÔö¼Óɾ³ý³ÌÐòÄÚ½øÐÐɾ³ý
2¡¢É¾³ýMySQLÎļþ¼ÐϵÄmy.iniÎļþ£¬Èç¹û±¸·ÝºÃ£¬¿ÉÒÔÖ±½Ó½«Îļþ¼ÐÈ«²¿É¾³ý
3¡¢¿ªÊ¼->ÔËÐÐ-> regedit ¿´¿´×¢²á±íÀïÕ⼸¸öµØ·½É¾³ýûÓÐ
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Eventlog\Application\MySQL Ŀ¼ɾ³ý
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\S ......

mysql distinct ¶Ô¶à×ֶιýÂ˲»ÕýÈ·µÄ½â¾ö·½·¨


ÏÂÃæÏÈÀ´¿´¿´Àý×Ó£º
    table
  id name
  1 a
  2 b
  3 c
  4 c
  5 b
¿â½á¹¹´ó¸ÅÕâÑù£¬ÕâÖ»ÊÇÒ»¸ö¼òµ¥µÄÀý×Ó£¬Êµ¼ÊÇé¿ö»á¸´Ôӵöࡣ
±ÈÈçÎÒÏëÓÃÒ»ÌõÓï¾ä²éѯµÃµ½name²»Öظ´µÄËùÓÐÊý¾Ý£¬ÄǾͱØÐëʹÓÃdistinctÈ¥µô¶àÓàµÄÖظ´¼Ç¼ ......

mysqlÁ¬½Ó²âÊÔ³ÌÐò

<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<%
//Á¬½ÓÊý¾Ý¿â
try
{
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
Connection connection= java.sql.DriverManager.getConnection("jdbc:mysql://localhost/dangyuan","root", ......

mysql ÐÞ¸ÄÃÜÂë

use mysql
update user set Password=password('newpassword') where User='root';
flush privileges;
Ê×ÏÈÒªÉùÃ÷Ò»µã£¬´ó²¿·ÖÇé¿öÏ£¬ÐÞ¸ÄMySQLÊÇÐèÒªÓÐmysqlÀïµÄrootȨÏ޵ģ¬
ËùÒÔÒ»°ãÓû§ÎÞ·¨¸ü¸ÄÃÜÂ룬³ý·ÇÇëÇó¹ÜÀíÔ±¡£
·½·¨Ò»
ʹÓÃphpmyadmin£¬ÕâÊÇ×î¼òµ¥µÄÁË£¬ÐÞ¸Ämysql¿âµ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ