¹ØÓÚMySQL±íÉè¼ÆÓ¦¸Ã×¢ÒâµÄÎÊÌâ(×öÁ˵ãÐÞ¸Ä)
¹ØÓÚMySQL±íÉè¼ÆÓ¦¸Ã×¢ÒâµÄÎÊÌâ(×öÁ˵ãÐÞ¸Ä)
¹Ø
ÓÚÉè¼Æ±íʱӦ¸Ã×¢ÒâµÄÎÊÌâ
ÈçÓдíÎó»¶Ó´ó¼ÒÖ¸³ö¡£Õâ
¶Îʱ¼äÔÚ¼ÒÀ×öÁ˵ãÐÞÕý¡£
1
¡¢É÷ÖØÑ¡Ôñ±íÃû¡£
ÓÐ
Á½ÖÖÑ¡Ôñ£º
°´ÕÕ¶àÊý¿ª·¢ÓïÑÔµÄÃüÃû¹æÔò¡£±ÈÈç
£¨myCustomer£©¡£
°´ÕÕ¶àÊý¿ªÔ´Ë¼ÏëÃüÃû¹æ
Ôò¡£±ÈÈ磨my_customer£©¡£
°´ÕÕÔÛÃÇÖйú
È˵Ä˼Ïë¡£±ÈÈ磨ÎҵĿͻ§£©¡£
µÚÒ»ÖÖÓиöȱµã£¬ºÜÈÝ
Ò×Íüµô´óдµÄ×Öĸ¡£
µÚ¶þÖÖÔò±È½ÏºÃ£¬Ã¿¸öWORD¼ä
ÓÃÏ»®ÏßÁ¬½Ó£¬±ÜÃâÒÅÍü¡£
µÚÈýÖÖ½¨Òé²»ÒªÓã¬ËäÈ»ºÜ
ºÃ¼Ç¡£²»¾õµÃ½âÎöÕâ¸ö±íµÄʱºò»¹ÐèÒª±àÂëת»¯Âð£¿ÎÒ¸öÈËÀí½â£¬´ó¼Ò¿ÉÒÔ²¹³ä¡£
2
. ¹ØÓÚ±àÂëµÄÉ趨¡£
A£® GBK/GB2312.
£¨ÊÊÓÃÓÚ´¿ÖÐÎÄ´æ´¢£©¡£
B£® UTF8.
£¨ÊÊÓÃÓÚÖÐÓ¢ÎÄ»ìºÏ´æ´¢£©¡£
C£® LATIN1¡££¨ÊÊ
ÓÃÓÚ´¿Ó¢ÎÄ´æ´¢£©¡£
D. ÆäËûµÄ¡£
3
. ¹ØÓÚ±íÒýÇæµÄÑ¡Ôñ¡£
A. MYISAM.
£¨ºÜ¶àÈË˵ËýµÄ±í¼¶Ëø¶¨»á´øÀ´ºÃ¶àÎÊÌ⣬ÆäʵֻҪÉè¼ÆºÃ¶ÔÓ¦µÄ±íÒÔ¼°Ð´ºÃ¶ÔÓ¦µÄSQL²éѯ¾ÍûÓÐÄÇô´óµÄÎÊÌâ¡££©
B. INNODB. £¨Èç
¹ûÒªÓõ½ÊÂÎñ£¬Ñ¡ÔñËý²»»á´í¡£ÖÁÓÚ¶àÊýÈ˽²µÄMASTER/SLAVE½á¹¹ÉÏÓÃINNODBÔÚMASTERµÄÑ¡ÔñÊÇ·ñÕýÈ·£¬¾ÍÒª¿´ÄãÔõôÓÃÁË¡£²»ÄÜһζµÄ
·è¿ñʹÓÃINNODB¡£³ý·ÇÄãÏëҪȷ±£·Ç³£¸ß¿ÉÓÃÐÔ£¬
£©
C. &
Ïà¹ØÎĵµ£º
mysql 5.0´æ´¢¹ý³Ìѧϰ×ܽá
Ò».´´½¨´æ´¢¹ý³Ì
1.»ù±¾Óï·¨£º
create procedure sp_name()
begin
………
end
2.²ÎÊý´«µÝ
¶þ.µ÷Óô洢¹ý³Ì
1.»ù±¾Óï·¨£ºcall sp_name()
×¢Ò⣺´æ´¢¹ý³ÌÃû³ÆºóÃæ±ØÐë¼ÓÀ¨ºÅ£¬ÄÄŸô洢¹ý³ÌûÓвÎÊý´«µÝ
Èý.ɾ³ý´æ´¢¹ý³Ì
1.»ù±¾Óï·¨£º
drop procedure sp_name// ......
(1)ʵÏÖÈýá¹û¼¯A-½á¹û¼¯B£º--ÀûÓÃnot
exists£¬ºÏ²¢Ôò¿ÉÓÃunion
exists,not
exists£ºÓÃÓÚÅжÏÇÒ»ñÈ¡½á¹û¼¯AÊÇ·ñ´æÔڵؽá¹û¼¯BÖÐ!
==========½á¹û¼¯A£º
SELECT
d.Device_ID,d.Device_Name,a.App_ID,a.App_Name
from
T_ ......
1¡¢ÏÔʾÊý¾Ý¿âÁÐ±í£º
show databases;
¸Õ¿ªÊ¼Ê±²ÅÁ½¸öÊý¾Ý¿â£ºmysqlºÍtest¡£mysql¿âºÜÖØÒªËüÀïÃæÓÐMYSQLµÄϵͳÐÅÏ¢£¬ÎÒÃǸÄÃÜÂëºÍÐÂÔöÓû§£¬Êµ¼ÊÉϾÍÊÇÓÃÕâ¸ö¿â½øÐвÙ×÷¡£
2¡¢ÏÔʾ¿âÖеÄÊý¾Ý±í£º
use mysql£» //´ò¿ª¿â
show tables;
3¡¢ÏÔʾÊý¾Ý±íµÄ½á¹¹£ ......
PHP·ÃÎÊMySQLÊý¾Ý¿âº¯Êý¼ò½é
1. ½øÐÐÊý¾Ý¿âÁ¬½Ó
Á¬½ÓÊý¾Ý¿â·þÎñÆ÷£¬¾ÍÊÇ¿Í»§¶ËÏò¼ºÔËÐеÄÊý¾Ý¿â·þÎñÆ÷·¢³öÁ¬½ÓÇëÇó£¬
³É¹¦ÒÔºó¾Í¿ÉÒÔ¶ÔÊý¾Ý¿â½øÐÐÏàÓ¦²Ù×÷£¬ÓÉÓÚÓû§µÄȨÏÞ²»Í¬£¬ËùÄܽø
ÐеIJÙ×÷Ò²²»Ò»Ñù¡£PHPÌṩÁËһϵÁÐMySQL ......
Red Hat Linux Ï°²×°mysql°æ±¾³åÍ»ÎÊÌâ½â¾ö
¸ÕÅöµ½Ò»¸öÎÊÌ⣬ÓÉÓÚÔÚʹÓõÄlinux·þÎñÆ÷ÉÏÒѾ°²×°ÁËÒ»¸ö½ÏµÍ°æ±¾µÄMySql server£¬Ê¹ÓÃrpm°ü½øÐа²×°Ê±£¬Ìáʾ°æ±¾³åÍ»£¬°²×°²»ÄܼÌÐø½øÐС£
ÓÉÓھɵÄÊý¾Ý²»ÏëÒªÁË£¬½â¾ö°ì·¨ÊÇÕâÑùµÄ£º
[b]1¡¢ÏÈ°ÑϵͳÀï°²×°µÄËùÓÐmysqlÕÒ³öÀ´[/b]
#rpm -qa | grep -i mysql ÔËÐдËÃüÁîº ......