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

MySqlÖеÄTimestampÀàÐÍ×ֶεÄʹÓÃ

TIMESTAMPÁÐÀàÐÍÌṩһÖÖÀàÐÍ£¬Äã¿ÉÒÔʹÓÃËü×Ô¶¯µØÓõ±Ç°µÄÈÕÆÚºÍʱ¼ä±ê¼ÇINSERT»òUPDATEµÄ²Ù×÷¡£Èç¹ûÄãÓжà¸öTIMESTAMPÁУ¬Ö»ÓеÚÒ»¸ö×Ô¶¯¸üС£
  ×Ô¶¯¸üеÚÒ»¸öTIMESTAMPÁÐÔÚÏÂÁÐÈκÎÌõ¼þÏ·¢Éú£º
ÁÐûÓÐÃ÷È·µØÔÚÒ»¸öINSERT»òLOAD   DATA   INFILEÓï¾äÖÐÖ¸¶¨¡£     
ÁÐûÓÐÃ÷È·µØÔÚÒ»¸öUPDATEÓï¾äÖÐÖ¸¶¨ÇÒһЩÁíÍâµÄÁиıäÖµ¡££¨×¢ÒâÒ»¸öUPDATEÉèÖÃÒ»¸öÁÐΪËüÒѾ­ÓеÄÖµ£¬Õ⽫²»ÒýÆðTIMESTAMPÁб»¸üУ¬ÒòΪÈç¹ûÄãÉèÖÃÒ»¸öÁÐΪËüµ±Ç°µÄÖµ£¬MySQLΪÁËЧÂʶøºöÂÔ¸ü¸Ä¡££©     
ÄãÃ÷È·µØÉ趨TIMESTAMPÁÐΪNULL.
³ýµÚÒ»¸öÒÔÍâµÄTIMESTAMPÁÐÒ²¿ÉÒÔÉèÖõ½µ±Ç°µÄÈÕÆÚºÍʱ¼ä£¬Ö»Òª½«ÁÐÉèΪNULL£¬»òNOW()¡£  
ÎÒʹÓõķ½·¨ÊÇÔÚ´´½¨±íʱ½«×ֶεÄĬÈÏÖµÉèΪnow()£¬ÕâÖÖ·½·¨ÊÇ¿ÉÒԵġ£ÆäËü·½·¨»¹Ã»ÊÔ£¬ÒÔºóÓÐʱ¼äÔÙÊÔһϡ£ÖîλÈôÖªµÀÕâ·½ÃæµÄ֪ʶ£¬Çë²»Áߴͽ̡£


Ïà¹ØÎĵµ£º

MYSQL·Ö±íÓÅ»¯


ÎÒÃǵÄÏîÄ¿ÖÐÓкö಻µÈÓÚµÄÇé¿ö¡£½ñÌìдÕâƪÎÄÕ¼òµ¥µÄ·ÖÎöÒ»ÏÂÔõô¸öÓÅ»¯·¨¡£
ÕâÀïµÄ·Ö±íÂß¼­ÊǸù¾Ýt_group±íµÄuser_name×éµÄ¸öÊýÀ´·ÖµÄ¡£
ÒòΪÕâÖÖÇé¿öµ¥¶Àuser_name×Ö¶ÎÉϵÄË÷Òý¾ÍÊôÓÚÀÃË÷Òý¡£Æð²»ÁËɶÃûÃ÷ÏÔµÄЧ¹û¡£
1¡¢ÊÔÑéPROCEDURE.
DELIMITER $$
DROP PROCEDURE `t_girl`.`sp_split_table`$$
CREATE PROCE ......

Íü¼ÇÁËMySQLµÄrootÃÜÂëÓ¦µ±ÈçºÎÈ¡»Ø

ÎÊ£ºÈç¹ûÍü¼ÇÁËMySQLµÄrootÃÜÂëÓ¦µ±ÈçºÎÈ¡»Ø£¿
´ð£º½â¾ö·½·¨ÈçÏ£º
·¨1£ºÔÚmy.cnfµÄ[mysqld]×ֶμÓÈ룺
skip-grant-tables
È»ºóÖØÆôÄãµÄmysqld,ÕâÑù¾ÃûÓÐÃÜÂëÁË.
È»ºó½øÈëmysql¡£
UPDATE mysql.user SET Password=PASSWORD
('password') WHERE User='root';
³É¹¦ºó
FLUSH PRIVILEGES;
×îºóÈ¥µômy.cnfÖеÄs ......

mysql UDF+triggerµÄÉñÆæħÁ¦

  1.ʲôÊÇUDF? UDF(user-defined function)ÊÇmysqlΪÓû§ÌṩµÄ×Ô¶¨Ò庯ÊýµÄÀ©Õ¹½Ó¿Ú¡£Ëü±¾ÖÊÉϺÍmysqlÌṩµÄmax¡¢minºÍcountµÈº¯ÊýÀàËÆ¡£ 2.UDF¿ÉÒÔ×öʲô? UDFÊÇ×Ô¶¨Ò庯Êý£¬ËùÒÔËüÄÜ×öʲôÍêÈ«È¡¾öÓÚÄãµÄʵÏÖ¡£UDF¿ÉÒÔÔÚÆÕͨµÄsql¡¢triggerÒÔ¼°store procedure±»µ÷ÓᣠÈç¹û×Ô¶¨ÒåÒ»¸ötcp_send(ip,port,msg)µ ......

ÈçºÎÐÞ¸ÄMYSQLÊý¾Ý¿âÀïµÄÓû§ÃûÃÜÂë

windows2003----¿ªÊ¼----ÔËÐÐ---mysql -uroot -p£¬½øÈëMYSQLÊý¾Ý¿â£¬ÊäÈëÃÜÂ룬µÇ½¡£
show databases;¿´¿´ÓÐÄÄЩÊý¾Ý¿â
use xxxxxx£»(xxxxxxΪÊý¾Ý¿âÃû£¬½øÈëÊý¾Ý¿â)
update user set passwd=MD5('111111*') where user_name = 'admin';£¨111111ΪҪÐ޸ĵÄÃÜÂ룩 ......

°²×°¡¢ÉèÖÃÓëÆô¶¯MySqlÂÌÉ«°æµÄ·½·¨

1¡¢½âѹ mysql-noinstall-5.1.30-win32.zip
2¡¢ÔÚ F Å̽¨Á¢Ä¿Â¼ MySql\MySqlServer5.1\
3¡¢°Ñ½âѹµÄÄÚÈݸ´ÖƵ½  F:\MySql\MySqlServer5.1\
4¡¢ÔÚ F:\MySql\MySqlServer5.1\ ÖÐÕÒ my-large.ini °ÑËü¸´ÖÆ³É my.ini
5¡¢ÔÚ my.ini ÖÐÕÒ [mysqld] £¬Ìí¼ÓÒÔÏÂÓï¾ä;
basedir="F:/MySql/MySqlServer5.1/"
datadir="F:/My ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ