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

ubuntuÖÐmysqlÂÒÂëÎÊÌâ

 ÏÈ¿´ÏÂÃæ×¢ÒâÄÚÈÝ
ÕûÕûŪÁËÒ»Ì죬ÖÕÓÚ½â¾öÁËjdbc(mysql-connector-java-5.0.30)ºÍmysqͨÐÅÖÐÎÄÂÒÂëµÄÎÊÌ⣡ÎÒµÄϵͳÊÇ
linux£¨ubuntu£©¡£ÔÚjavaÖУ¨Myeclipse»·¾³£©Ê¹ÓÃhibernateÁ¬½Ómysql¡£´æ´¢Ó¢ÎÄûÎÊÌ⣬д£¨insert
into£©ºÍ¶Á£¨select£©¶¼ÄÜÕýÈ·ÏÔʾ£¬µ«ÊÇÈôÆäÖдøÓÐÖÐÎÄ×Ö·û¾Í³ÉÂÒÂëÁË¡£µ½ÍøÉϲéÕÒÁË°ëÌì×ÊÁÏ£¬×îºó
ÖÕÓڳɹ¦¡£
ÎҵĽâ¾ö·½·¨ÊÇ£¬ÔÚ/etc/my.cnfÎļþÖмÓÉÏÒÔÏÂÁ½ÐÐÄÚÈÝ£º
[client]default-character-set=utf8[mysqld]default-character-set=utf8
×¢Ò⣬Õâ¸öÎļþ²»Ò»¶¨´æÔÚ£¬Ð轫 /°²×°Ô­Îļþ/support-files/my-medium.cnf ¸´ÖƵ½/etc/Ï£¬ÖØÃüÃû
ÐèÖØÆômysql
Í£Óãºsudo /usr/local/mysql/bin/mysqladmin shutdown
ÆôÓÃsudo /usr/local/mysql/bin/mysqld_safe -user=mysql &
²é¿´mysql±àÂë
ÆôÓúósudo /usr/local/mysql/bin/mysql
mysql>show variables like 'character%';
-------------------------- ----------------------------
| Variable_name | Value |
-------------------------- ----------------------------
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
-------------------------- ----------------------------
×¢Ò⣬ÕâÑù¸Ä±äºóÔ­ÏÈËù½¨Êý¾Ý¿âËƺõ²»ÄÜÓ㨲»È·¶¨£©£¬¾¡Á¿±¸·Ý
н¨Êý¾Ý¿â£¬¾Í²»»áÓÐÂÒÂëÁË¡£
screen.width*0.7)
{this.resized=true; this.width=screen.width*0.7; this.alt='Click here
to open new window\nCTRL Mouse wheel to zoom in/out';}"
onmouseover="if(this.width>screen.width*0.7) {this.resized=true;
this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click
here to open new window\nCTRL Mouse wheel to zoom in/out';}"
onclick="if(!this.resiz


Ïà¹ØÎĵµ£º

mysql²Ù×÷ Left join , Right Join, Inner Join


Ò».ÏÈ¿´Ò»Ð©×î¼òµ¥µÄÀý×Ó
Àý×Ó
Table A
aid   adate
1      a1
2      a2
3      a3
TableB
bid bdate
1    b1
2   b2
4    b4
Á½¸ö±ía,bÏàÁ¬½Ó,Ҫȡ ......

mySqlÊý¾Ý¿âÁ¬½Ó

Class.forName("com.mySQL.jdbc.Driver");
   String strUrl="jdbc:mysql://localhost:3306/stu?useUnicode=true&characterEncoding=GB2312";
   String strUser="nuey";
   String strPassword="password";
   Connection conn=DriverManager.getCon ......

mysql°²×°Í¼½â½Ì³Ì 5.1(ת)

mysql°²×°Í¼½â½Ì³Ì 5.1
2009Äê03ÔÂ01ÈÕ ÐÇÆÚÈÕ 23:51
תÔØÇë×¢Ã÷³ö´¦:http://hi.baidu.com/herdff/blog/item/6e6b4bcf6132f90b93457e14.html
±¾½Ì³ÌÒÔMysql 5.1°æ±¾ÎªÀý£¬¸ü¸ß°æ±¾°²×°¹ý³ÌÓë´ËÀàËÆ¡£ÔĶÁÇ°£¬ÇëÏÂÔØ5.1£¬ÏÂÔصØÖ·£ºwww.mysql.com
°²×°¹ý³ÌÓëÆäËüWindows°²×°³ÌÐòÒ»Ñù£¬Ê×ÏȳöÏÖµÄÊÇ°²×°Ïòµ¼»¶Ó­½çÃæ
Ö ......

CÓïÑÔÁ¬½ÓmysqlÊý¾Ý¿â£¬¶ÁÈ¡mysqlÄÚÈÝ

 //linuxϱàÒëg++ $(mysql_config --cflags)  ***.cpp  $(mysql_config --libs)
/*mysqlÊý¾Ý¿âÖбíµÄÄÚÈÝ
mysql> select * from maindb;
+------------------+---------+-------------+---------+----------+---------------------+---------------------+---------------------+------------------- ......

mysql Óαê

¶¨ÒåÓαê 
DECLARE cur_Ãû³Æ CURSOR
FOR
SELECT ×Ö¶Î1,×Ö¶Î2,...×Ö¶În from ±í where ×Ö¶Î1=±äÁ¿;
DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET ±äÁ¿1=null,±äÁ¿2=null;
OPEN cur_Ãû³Æ;
FETCH cur_Ãû³Æ INTO ±äÁ¿1,±äÁ¿2...;
WHILE ( ±äÁ¿1  IS NOT NULL) DO
 &nbs ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ