MySQL È«ÎļìË÷ ʵÏÖÖÐÎļìË÷
ͨ¹ýMySQLÄÚÖÃÈ«ÎļìË÷ʵÏÖÖÐÎĵÄÏà¹Ø¼ìË÷
¹Ø¼ü×Ö£ºMySQL È«ÎļìË÷ È«ÎÄË÷Òý ÖÐÎÄ·Ö´Ê ¶þÔª·Ö´Ê ÇøλÂë ÏàËƶÈ
×¢£º±¾ÎÄʹÓõÄMySQL°æ±¾Îª£ºMySQL 4.0.x
ÔÚMySQL4ÖУ¬ÊÇÒѾ¿ªÊ¼Ö§³ÖÈ«ÎļìË÷£¨Ë÷Òý£©µÄÁË¡£µ«ÊÇÖ»ÊǶÔÓ¢ÎÄÖ§³ÖÈ«ÎļìË÷¡£
ÓÉÓÚÓ¢ÎÄÔÚÊéдÉϵÄÌØÊâÐÔ£¬Ê¹µÃ·Ö´ÊËã·¨Ïà¶ÔÖÐÎÄÀ´Ëµ£¬¼òµ¥µÃ¶à¡£Ò»°ãÀ´Ëµ£¬ÎÒÃÇ¿ÉÒÔͨ¹ýµ¥´ÊÓëµ¥´ÊÖ®¼äµÄ¿Õ¸ñ£¬ÒÔ¼°±êµã·ûºÅÀ´Íê³ÉÕâ¸ö·Ö´Ê¹ý³Ì¡£
µ«ÊǾÍÖÐÎÄÀ´Ëµ£¬¾ÍûÓÐÄÇô¼òµ¥¡£MySQLÎÞ·¨¶ÔÖÐÎÄ×ö³öÕýÈ·µÄ·Ö´Ê£¬¼ÙÉèÓÐÈçÏÂÓ¢Îľä×Ó£º
"Hello world! Hello PHP!"
ͨ¹ýÉÏÃæÌá¼°µÄ·½·¨£¬¿ÉÒԺܼòµ¥µÄ°ÑÕâ¸ö¾ä×Ó·Ö´ÊΪ£º
1 Hello
2 world
3 PHP
ÎÒÃÇÔÙÀ´¿´¿´ÖÐÎĵľä×Ó£º
"ÄãºÃÊÀ½ç£¬ÄãºÃPHP£¡"
°´ÕÕÓ¢ÎĵÄËã·¨£¬·Ö´ÊÈçÏ£º
1 ÄãºÃÊÀ½ç
2 ÄãºÃPHP
ÏÔÈ»ÊDz»ÄÜÂú×ãÎÒÃǵÄÐèÒªµÄ¡£
ËùÒÔ£¬Ê×ÏÈÎÒÃÇÒª×öµÄÊÇ£¬°ÑÖÐÎĵľä×Óת±äΪMySQLÑÛÖеÄÓ¢ÎÄ£¬ÒÔ±ãʹµÃËüÄÜÒÔÓ¢ÎÄ·Ö´ÊË㷨ȥ¶Ô¾ä×Ó½øÐÐÕýÈ·µÄ·Ö´Ê´¦Àí¡£
ÏȽ«ÉÏÃæÖÐÎľä×Ó½øÐбêµã¹ýÂË´¦Àí£¬µÃµ½ÒÔϾä×Ó£º
ÄãºÃÊÀ½ç ÄãºÃPHP
½Ó×ÅÔÙʹÓÃÖÐÎÄ·Ö´ÊÖнϼòµ¥ÊµÏֵĶþÔª·Ö´ÊËã·¨¶Ô¾ä×Ó½øÐжþÔª·Ö´Ê£¬µÃµ½ÒÔϾä×Ó£º
ÄãºÃ ºÃÊÀ ÊÀ½ç ÄãºÃ PHP
ÒòΪ°Ñ±êµã·ûºÅÌ滻Ϊ¿Õ¸ñ£¬ÒÔ¼°PHP±¾ÉíΪӢÎÄ×ÖĸµÄ¹Øϵ£¬¿ÉÒÔ²»ÓýøÐжþÔªÇз֣¬ËùÒԵõ½ÉÏÃæ¾ä×Ó¡£
Õâ¸öʱºò£¬ÎÒÃÇÀ´¿´¿´´¦Àí¹ýºóµÄ¾ä×Ó£¬»á·¢ÏÖ£¬¾ÍÆäÊéд¸ñʽÉÏÀ´Ëµ£¬ÒѾ·ûºÏÓ¢ÎĵÄÊéд¸ñʽ£¬¼ÈÒÔ¿Õ¸ñ£¬±êµãÀ´¶Ôµ¥´ÊÐγÉ×ÔÈ»¼ä¸ô¡£Ö»ÊÇÉÏÃæ¾ä×ÓûÓбêµã£¬Ö»Óпոñ¶øÒÑ¡£
µ½´Ë£¬ÎÒÃÇÒѾ³É¹¦µÄ½«ÖÐÎÄ“·Òë”ΪMySQLÄÜÀí½âµÄ“Ó¢ÎÄ”Êéд¸ñʽ¡£
µ«ÊÇ£¬ÎÊÌ⻹û½â¾ö£¬Ê×ÏÈ£¬MySQLÖУ¬ft_min_word_len£¨·Ö´Ê´Ê»ã×îС³¤¶È£©Õâ¸ö²ÎÊýµÄĬÈÏֵΪ4£¬Ò²¾ÍÊÇ4¸ö×ÖĸÒÔÉϳ¤¶ÈµÄµ¥´Ê£¬²Å»á±»¿¼ÂÇ£¬Ð¡ÓÚ4¸öµÄ£¬½«»á±»ºöÂÔ¡£
Èç¹û²»¸Ä±äÕâ¸ö³¤¶È£¬°´ÕÕÉÏÃæµÄ·Ö´Ê½á¹û£¬ÎÒÃǽ«ÎÞ·¨Í¨¹ý ÄãºÃ£¬ÊÀ½ç£¬PHPµÈ¼ìË÷µ½Ïà¹ØµÄ½á¹û£¬ÒòΪ·Ö³öÀ´µÄ´ÊÌ«¶ÌÁË£¬²»ÔÚMySQLµÄÑ¡Ôñ·¶Î§ÄÚ¡£
ÎÒÃÇ¿ÉÒÔͨ¹ýÐÞ¸Äft_min_word_lenµÄÖµ£¬½«ÆäÉèÖÃΪ2À´½â¾öÉÏÃæÎÊÌ⣬µ«ÊÇÕâÑù×öµÄ»°£¬ÔÚ¼ìË÷ÁбíÖеÄÔ±¾¾ÍΪӢÎĵĶÌС´Ê»ã£¬È磺PHP£¬MP3£¬Ò²»á±»»®Èë¼ìË÷·¶Î§ÄÚ£¬ÕâÑù×öµÄ½á¹ûÊÇ£¬³öÏֺܶàÎÞÒâÒåµÄÏà¹Ø½á¹û¡£
Çë¿´ÒÔÏÂÁÐ±í£º
[MP3] the look
[MP3] because of you
ÒòΪËûÃǶ¼Í¬ÓÐMP3ÔÚ±êÌâÖУ¬ËùÒÔ»á³öÏÖÉÏÊöÌáµ½µÄÎÊÌâ¡£
»Øµ½ft_min_word_lenÖµµÄÎÊÌ⣬ÎÒÃÇÖ®ËùÒÔÒªÐÞ¸ÄËû£¬ÊÇΪÁËÄÜÈÃMySQLÕÒµ½ÎÒÃǵĶþÔª·Ö
Ïà¹ØÎĵµ£º
ÓÉÓÚMySQLÄ¿Ç°×ֶεÄĬÈÏÖµ²»Ö§³Öº¯Êý£¬ËùÒÔÒÔ
create_time datetime default now()
µÄÐÎʽÉèÖÃĬÈÏÖµÊDz»¿ÉÄܵġ£
´úÌæµÄ·½°¸ÊÇʹÓÃTIMESTAMPÀàÐÍ´úÌæDATETIMEÀàÐÍ¡£
TIMESTAMPÁÐÀàÐÍ×Ô¶¯µØÓõ±Ç°µÄÈÕÆÚºÍʱ¼ä±ê¼ÇINSERT»òUPDATEµÄ²Ù×÷¡£
Èç¹ûÓжà¸öTIMESTAMPÁУ¬Ö»ÓеÚÒ»¸ö×Ô¶¯¸üС£
×Ô¶¯¸üеÚÒ»¸öTIMESTAMPÁÐÔÚÏ ......
ͨ¹ýÎļþÃû²éÕÒ·¨£º
Õâ¸ö·½·¨ËµÆðÀ´¾ÍºÍÔÚWINDOWSϲéÕÒÎļþÒ»ÑùÈÝÒ×Àí½âÁË¡£Èç¹ûÄã°ÑÕâ¸öÎļþ·ÅÔÚµ¥¸öµÄÎļþ¼Ð
ÀïÃ棬ֻҪʹÓó£¼ûµÄ“ls"ÃüÁî¾ÍÄÜ·½±ãµÄ²éÕÒ³öÀ´£¬ÄÇôʹÓÓfind”ÃüÁîÀ´²éÕÒËü¾Í²»Äܸø
ÄãÁôÏÂÉî¿ÌµÄÓ¡Ï󣬱Ͼ¹“find”ÃüÁîµÄÇ¿´ó¹¦Äܲ»Ö¹Õâ¸ö¡£Èç¹ûÖªµÀÁËij¸öÎļþµÄÎÄ ......
µÇ½ÒÔºóÔËÐÐÒÔÏÂÃüÁ¸øÓèÔ¶³Ì·ÃÎÊ¿Í»§¶ËȨÏÞ..
grant all on *.* to 'remote'@'172.16.21.39' identified by 'password';
remote±íʾÓû§Ãû.
'172.16.21.39' Ô¶³ÌipµØÖ·
password±íʾԶ³ÌµÇ½ÃÜÂë.
ĬÈÏ×´¿öÏ£¬³öÓÚ°²È«¿¼ÂÇ£¬mysqlÊý¾Ý¿âÆÁ±ÎÁËÔ¶³Ì·ÃÎʹ¦ÄÜ¡£ È»¶øÔÚÐí¶à×´¿öÏ£¬ÄãÐèÒªÔÚ¼Ò
»òÕß´Óweb³ÌÐòÈ¥·ÃÎÊ ......
1¡¢MySQL³£ÓÃÃüÁî
create database name; ´´½¨Êý¾Ý¿â
use databasename; Ñ¡ÔñÊý¾Ý¿â
drop database name Ö±½Óɾ³ýÊý¾Ý¿â£¬²»ÌáÐÑ
show tables; ÏÔʾ±í
describe tablename; ±íµÄÏêϸÃèÊö
select ÖмÓÉÏdistinctÈ¥³ýÖظ´×Ö¶Î
mysqladmin drop databasename ɾ³ýÊý¾Ý¿âÇ°£¬ÓÐÌáʾ¡£
ÏÔʾµ±Ç°mysql°æ±¾ºÍµ±Ç°È ......