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

mysql»ù´¡ÖªÊ¶

1. MySQLÊÇÒ»¸öСÐ͹ØϵÐÍÊý¾Ý¿â¹ÜÀíϵͳ
2. MySQLµÄÊý¾ÝÀàÐÍ£º
ÕûÊýÐÍ£ºTINYINT£¬SMALLINT£¬INT£¬BIGINT
СÊýÐÍ£ºFLOAT£¬DOUBLE£¬DECIMAL(M,D)
×Ö·ûÐÍ£ºCHAR£¬VARCHAR
ÈÕÆÚÐÍ£ºDATETIME £¬DATE£¬TIMESTAMP
±¸×¢ÐÍ£ºTINYTEXT £¬TEXT £¬LONGTEXT
£¨°´php100µÄ½Ì³ÌÀï·ÖµÄ£©
3.MySQLµÄ»ù±¾Óï¾ä
´´½¨Êý¾Ý¿â CREATE DATABASE Êý¾Ý¿âÃû
ɾ³ýÊý¾Ý¿â DIOP DATABASE Êý¾Ý¿âÃû
´´½¨Êý¾Ý±í CREATE TABLE ±íÃû
ɾ³ýÊý¾Ý±í DROP TABLE ±íÃû
ÐÞ¸ÄÒ»¸ö×Ö¶ÎÃû³Æ RENAME TABLE `Ô­×Ö¶ÎÃû`TO`ÐÂ×Ö¶ÎÃû`;
ɾ³ýÒ»¸ö×ֶΠALTER TABLE `±í`DROP`Ô­×Ö¶Î`;
²åÈëÒ»¸ö×ֶΠALTER TABLE `±í`ADD`ÐÂ×Ö¶Î`...AFTER`Ô­×Ö¶Î`;
4.²éѯÓï¾ä ²åÈëÓï¾ä ¸üÐÂÓï¾ä ɾ³ýÓï¾ä
²éѯÓï¾ä
SELECT ²éѯ×ֶΠfrom ±íÃû WHERE Ìõ¼þ
²éѯ×ֶΣº¿ÉÒÔʹÓÃͨÅä·û* ¡¢×Ö¶ÎÃû¡¢×ֶαðÃû
±íÃû£ºÊý¾Ý¿â.±íÃû£¬±íÃû
³£ÓÃÌõ¼þ£º = µÈÓÚ¡¢<>²»µÈÓÚ¡¢in °üº¬¡¢ not in ²»°üº¬¡¢ like Æ¥Åä
BETWEENÔÚ·¶Î§¡¢ not BETWEEN²»ÔÚ·¶Î§< ¡¢>
Ìõ¼þÔËË㣺 and ¡¢ or ¡¢ ( )
²åÈëÓï¾ä
insert into ±íÃû (×ֶ΅,…) values(Öµ…,…)
¸üÐÂÓï¾ä
UPDATE ±íÃû SET ×Ö¶Î=Öµ WHERE Ìõ¼þ limit
³£ÓÃÌõ¼þ£º = µÈÓÚ¡¢<>²»µÈÓÚ¡¢in °üº¬¡¢ not in ²»°üº¬¡¢ like Æ¥Åä
BETWEENÔÚ·¶Î§¡¢ not BETWEEN ²»ÔÚ·¶Î§
ɾ³ýÓï¾ä
DELETE from ±íÃû WHERE Ìõ¼þ limit
³£ÓÃÌõ¼þ£º = µÈÓÚ¡¢<>²»µÈÓÚ¡¢in °üº¬¡¢ not in ²»°üº¬¡¢ like Æ¥Åä
BETWEENÔÚ·¶Î§¡¢ not BETWEEN ²»ÔÚ·¶Î§


Ïà¹ØÎĵµ£º

JDBC+MySQLÁ¬½Ó³Ø

1.´´½¨Ò»¸öjava projectÏîÄ¿pooling
2.ΪÏîÄ¿Ìí¼ÓMySQLÁ¬½ÓÇý¶¯
3.ΪÏîÄ¿Ìí¼ÓÒ»¸öÅäÖÃÎļþdbpool.proprerties
Code
driverClassName=com.mysql.jdbc.Driver
username=root
password=
url=jdbc:mysql://localhost:3306/work
poolSize=10
 
4.·Ö±ð´´½¨Ò»¸öÁ¬½ÓÀàConnectionPool.javaºÍÒ»¸ö²âÊÔÀàConnectionPoo ......

mysql¼ÓÃܽâÃܺ¯ÊýAES_ENCRYPTÓëAES_DECRYPT

mysqlϵļÓÃܺ¯ÊýÓÐÈçϼ¸¸ö
PASSWORD()£º´´½¨Ò»¸ö¾­¹ý¼ÓÃܵÄÃÜÂë×Ö·û´®£¬ÊʺÏÓÚ²åÈëµ½MySQLµÄ°²È«Ïµ
ͳ¡£¸Ã¼ÓÃܹý³Ì²»¿ÉÄ棬ºÍunixÃÜÂë¼ÓÃܹý³ÌʹÓò»Í¬µÄËã·¨¡£Ö÷ÒªÓÃÓÚMySQLµÄÈÏ֤ϵͳ¡£
 
ENCRYPT(£¬)£ºÊ¹ÓÃUNIX crypt()ϵͳ¼ÓÃÜ×Ö·û´®£¬ENCRYPT()º¯Êý½ÓÊÕÒª¼ÓÃܵÄ×Ö·û´®ºÍ£¨¿ÉÑ¡µÄ£©ÓÃÓÚ¼ÓÃܹý³ÌµÄsalt£¨Ò»¸ ......

Mysql¿ªÆôÈÕÖ¾

Ô­ÎÄת×Ô:http://hi.baidu.com/jackli00/blog/item/21b2e242025bfa1473f05d24.html
Mysql¿ªÆôÈÕÖ¾
2008-11-18 11:23
ÊÇ·ñÆôÓÃÁËÈÕÖ¾
mysql>show variables like 'log_bin';
ÔõÑùÖªµÀµ±Ç°µÄÈÕÖ¾
mysql> show master status;
¿´¶þ½øÖÆÈÕÖ¾ÎļþÓÃmysqlbinlog
shell>mysqlbinlog mail-bin.000001(Ҫд¾ø¶ÔÎÊÌâ ......

MysqlÊý¾Ý±¸·ÝÒÔ¼°ÒìµØ´æ´¢

ÕûÀítuscany.org.cnµÄ·þÎñÆ÷£¬·¢ÏÖ3ÄêǰдµÄ½Å±¾»¹ÔÚÅÜ×Å :)
½Å±¾ÈçÏ£º
#==========================================================
#!/bin/bash
current_date=`date +%Y-%m-%d:%H:%M:%S`
/usr/local/mysql/bin/mysqldump -prootpass  dbname1 > ./DB_DIR/dbname1_"$current_date"_dump_file.sql 
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ