MySQLÍü¼ÇÃÜÂë´¦Àí·½·¨
ÔÚwindowsÏ£º
´ò¿ªÃüÁîÐд°¿Ú£¬Í£Ö¹mysql·þÎñ£º Net stop mysql
Æô¶¯mysql£¬Ò»°ãµ½mysqlµÄ°²×°Â·¾¶£¬ÕÒµ½ mysqld-nt.exe
Ö´ÐУºmysqld-nt --skip-grant-tables µ±Ç°´°¿Ú½«»áÍ£Ö¹¡£
ÁíÍâ´ò¿ªÒ»¸öÃüÁîÐд°¿Ú£¬Ö´ÐÐmysql Èç¹ûÌáʾûÓÐÕâ¸öÃüÁÏȽøÈëMYSQLµÄ°²×°Î»ÖÃÏÂBINĿ¼ÔÙÔËÐÐmysql>use mysql
>update user set password=password("new_password") where user="root";
>flush privileges;
>exit
ÓÃCtrl+Alt+Del£¬ÕÒµ½mysqld-ntµÄ½ø³ÌɱµôËü£¬ÔÚÖØÐÂÆô¶¯mysql-nt·þÎñ£¬¾Í¿ÉÒÔÓÃÐÂÃÜÂëµÇ¼ÁË
ÔÚlinuxÏ£º
Èç¹û MySQL ÕýÔÚÔËÐУ¬Ê×ÏÈɱ֮£º killall -TERM mysqld¡£
Æô¶¯ MySQL £ºbin/safe_mysqld --skip-grant-tables &
¾Í¿ÉÒÔ²»ÐèÒªÃÜÂë¾Í½øÈë MySQL ÁË¡£
È»ºó¾ÍÊÇ
>use mysql
>update user set password=password("new_pass") where user="root";
>flush privileges;
ÖØÐÂɱ MySQL £¬ÓÃÕý³£·½·¨Æô¶¯ MySQL ¡£
zz http://www.javaeye.com/topic/199647
Ïà¹ØÎĵµ£º
mysql set names ÎÊÌâ
mysql_query("set names 'utf8'");
Ò»Ö±ÒÔÀ´×ÜÒÔΪset names ÊÇÓÃÀ´ÉèÖÃmsyql µÄ×Ö·û¼¯µÄ£¬×î½ü×÷¸ö¶«Î÷²Å·¢ÏÖ×Ô¼ºÈÏʶÉϵĴíÎó£¬
²éÒ»ÏÂÊÖ²á
SET NAMES ‘x‘Óï¾äÓëÕâÈý¸öÓï¾äµÈ¼Û£º
mysql> SET character_set_client = x;
mysql> SET character_set_results = x;
mysql> ......
×¢Ò⣺֮ǰÎÒÔÚÍøÉÏÕÒÁ˺öàµÄ×ÊÁÏ NND¶¼²»ÄÜÕý³£ÅäÖóɹ¦ ¸ãµÃÎÒÊǷdz£µØÓôÃÆ£¡
ÕÒµ½ÕâƪÎÄÕÂÖ®ºóÎÒÖÕÓÚÅäÖóɹ¦ÁË£¡ÍÛºÃˬѽ£¡Ö»Òª°´ÕÕ ÉÏÃæµÄ²½Öè¾ÍÒ»¶¨Äܹ»³É¹¦µÄ£¡
´ËÎÄյݲװ·½·¨ÊÊÓÃÓÚWindows XPϵÄApache+PHP+MySQL°²×°£¬Í¬Ê±Ò²ÊÊÓÃÓÚWindows 2003ϵͳϵݲװºÍÅäÖá£
1. °²×°»·¾³
²Ù×÷ϵͳÊÇ Window ......
±íÃûΪtableµÄ±íÄÚÈÝÈçÏÂ
Year month value
2009 1 1.1
2009 2 1.2
2009 3 1.3
2009 4 1.4
2010 1 2.1
2010 2 2.2
2010 3 &nb ......
Mysql
sudo netstat -tap | grep mysql
µ±ÄúÔËÐиÃÃüÁîʱ£¬Äú¿ÉÒÔ¿´µ½ÀàËÆÏÂÃæµÄÐУº
linuxidc@linuxidc-laptop:~$">linuxidc@linuxidc-laptop:~$ sudo netstat -tap | grep mysql
[sudo] password for linuxidc:
tcp &n ......
²éѯ¼°É¾³ýÖظ´¼Ç¼µÄ·½·¨
(Ò»)
1¡¢²éÕÒ±íÖжàÓàµÄÖظ´¼Ç¼£¬Öظ´¼Ç¼ÊǸù¾Ýµ¥¸ö×ֶΣ¨peopleId£©À´ÅжÏ
select * from people
where peopleId in (select peopleId from people group by peopleId having count(peopleId) > 1)
2¡¢É¾³ý±íÖжàÓàµÄÖظ´¼Ç¼£ ......