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

mysqlѧϰ4

£­£­¶à±í²Ù×÷
   Ç°ÃæÎÒÃÇÊìϤÁËÊý¾Ý¿âºÍÊý¾Ý¿â±íµÄ»ù±¾²Ù×÷£¬ÏÖÔÚÎÒÃÇÔÙÀ´¿´¿´ÈçºÎ²Ù×÷¶à¸ö±í¡£
   ÔÚÒ»¸öÊý¾Ý¿âÖУ¬¿ÉÄÜ´æÔÚ¶à¸ö±í£¬ÕâЩ±í¶¼ÊÇÏ໥¹ØÁªµÄ¡£ÎÒÃǼÌÐøʹÓÃÇ°ÃæµÄÀý×Ó¡£Ç°Ã潨Á¢µÄ±íÖаüº¬ÁËÔ±¹¤µÄһЩ»ù±¾ÐÅÏ¢£¬ÈçÐÕÃû¡¢ÐԱ𡢳öÉúÈÕÆÚ¡¢³öÉúµØ¡£ÎÒÃÇÔÙ´´½¨Ò»¸ö±í£¬¸Ã±íÓÃÓÚÃèÊöÔ±¹¤Ëù·¢±íµÄÎÄÕ£¬ÄÚÈÝ°üÀ¨×÷ÕßÐÕÃû¡¢ÎÄÕ±êÌâ¡¢·¢±íÈÕÆÚ¡£
1¡¢²é¿´µÚÒ»¸ö±ímytableµÄÄÚÈÝ£º
mysql> select * from mytable;
+----------+------+------------+-----------+
| name    |   | birth    | birthaddr |
+----------+------+------------+-----------+
| abccs   |f    | 1977-07-07 | china    |
| mary    |f    | 1978-12-12 | usa     |
| tom    |m    | 1970-09-02 | usa     |
+----------+------+------------+-----------+
2¡¢´´½¨µÚ¶þ¸ö±ítitle£¨°üÀ¨×÷Õß¡¢ÎÄÕ±êÌâ¡¢·¢±íÈÕÆÚ£©:
mysql> create table title(writer varchar(20) not null,
   -> title varchar(40) not null,
   -> senddate date);
   Ïò¸Ã±íÖÐÌî¼Ó¼Ç¼£¬×îºó±íµÄÄÚÈÝÈçÏ£º
mysql> select * from title;
+--------+-------+------------+
| writer | title | senddate   |
+--------+-------+------------+
| abccs | a1   | 2000-01-23 |
| mary   | b1   | 1998-03-21 |
| abccs | a2   | 2000-12-04 |
| tom   | c1   | 1992-05-16 |
| tom   | c2   | 1999-12-12 |
+--------+-------+------------+
5 rows in set (0.00sec)
3¡¢¶à±í²éѯ
   ÏÖÔÚÎÒÃÇÓÐÁËÁ½¸ö±í: mytable ºÍ title¡£ÀûÓÃÕâÁ½¸ö±íÎÒÃÇ¿ÉÒÔ½øÐÐ×éºÏ²éѯ£º
ÀýÈçÎÒÃÇÒª²éѯ×÷ÕßabccsµÄÐÕÃû¡¢ÐÔ±ð¡¢ÎÄÕ£º
mysql> SELECT name,,title from mytable,title
   -> WHERE name=writer AND name='abccs';
+-------+------+-------+
| name |   | title |
+-------+------+-------+
| abccs | f   | a1   |


Ïà¹ØÎĵµ£º

MySQLÓÐËÄÖÖBLOBÀàÐÍ:


MySQLÓÐËÄÖÖBLOBÀàÐÍ:
¡¡¡¡·tinyblob:½ö255¸ö×Ö·û
¡¡¡¡·blob:×î´óÏÞÖƵ½65K×Ö½Ú
¡¡¡¡·mediumblob:ÏÞÖƵ½16M×Ö½Ú
¡¡¡¡·longblob:¿É´ï4GB
¡¡¡¡ÔÚÿ¸öMySQLµÄÎĵµ(´ÓMySQL4.0¿ªÊ¼)µÄ½éÉÜÖÐ,Ò»¸ölongblobÁеÄ×î´óÔÊÐí³¤¶ÈÒÀÀµÓÚÔÚ¿Í»§/·þÎñÆ÷ЭÒéÖпÉÅäÖõÄ×î´ó°üµÄ´óСºÍ¿ÉÓÃÄÚ´æÊý¡£
¡¡¡ ......

ʹÓÃHibernate+MySql+native SQLµÄBUG,ÒÔ¼°½â¾ö°ì·¨

±¾À´ÊÇmssql+hibernate+native SQL Ó¦ÓõĺܺÍг
µ«Êǵ½ÁË°Ñmssql»»³Émysql£¬¾Í³öÁË´í(ͬÑùµÄÊý¾Ý½á¹¹ºÍÊý¾Ý)¡£
²éѯ·½·¨ÊÇ£º
String sql =
"select id XXX_ID from t_tab";
List<Map> list = session.createSQLQuery(sql)
.setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP)
.list();
´í ......

mysql »¥ÎªÖ÷´Ó


grant replication slave on *.* to backup@192.168.188.128 identified by "123456"; 
grant replication slave on *.* to backup@192.168.188.8 identified by "123456"; 
service mysql stop
server_id = 1
log-bin = mysql-bin
log-error=mysql-error
master-host = 192.168.188.8
master-user = ba ......

MySQLѧϰ2

  Á˽âÁËһЩ×î»ù±¾µÄ²Ù×÷ÃüÁîºó£¬ÎÒÃÇÔÙÀ´Ñ§Ï°ÈçºÎ´´½¨Ò»¸öÊý¾Ý¿âºÍÊý¾Ý¿â±í¡£
1¡¢Ê¹ÓÃSHOWÓï¾äÕÒ³öÔÚ·þÎñÆ÷Éϵ±Ç°´æÔÚʲôÊý¾Ý¿â£º
mysql> SHOW DATABASES;
+----------+
| Database |
+----------+
| mysql   |
| test    |
+----------+
3 rows in set (0.00 sec) ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ