Ê×ÓÃMYSQLË÷ÒýµÄ¿ì¸Ð
ÓÃÁËMYSQLÒ»Äê¶à£¬ÇÒÒ»Ö±±»MYSQLµÄ¿ìËÙ²éѯËùÎüÒý£¬¿É½ñÌìÔõôÅöʯͷÁË£¿
1Dp4V*W+t0
3p)o{3s.a'^Qr0
ÔÀ´¾ÍÊÇË÷ÒýÔÚ×ö¹Ö¡£ÓÉÓÚ±¾ÈËÊÇÒµÓà°®ºÃ×ÔѧPHP+MYSQL¿ª·¢£¬ËùÒÔÔÚÀíÂÛÓÅ»¯·½ÃæÒ»°ã¿¼ÂÇÉõÉÙ£¬»ù±¾²»ÓÃ×Ö¶ÎË÷ÒýÈ¥×öMYSQLÓÅ»¯£¬¿ÉÄÜÒ²ÊÇÎÒ²»»áÓðɡ££¨×Ü¿´ÊéÉÏ˵Ë÷ÒýµÄºÃ´¦ºÃ´¦µÄ£¬½ñÌì×Åʵ³¢µ½ÌðÍ·ÁË¡££©PHPChina ¿ªÔ´ÉçÇøÃÅ»§Eg'Z-G{P:B-MM
D
Bsb fA�O*f7@S$X0
u5Ru%Ju0
½²½²¾¹ý£ºPHPChina ¿ªÔ´ÉçÇøÃÅ»§6qF"f+t/c3B5yS7x4p
h-\IO!I
U#D0
¸ù¾Ý³ÌÐòÂß¼ÐèÒª£¬ÎÒµÃÓÃPHP
·´
¸´È¥²Ù×÷Õâ¸ö°ÙÍòÌõÊý¾Ý±í3-4´Î£¬ÆäÖÐÓÐselectºÍupdate(updateµÄʱºòÐèҪȥÉú³ÉÒ»¸öÎı¾Îļþ)£¬delete£¨deleteµÄʱºò
ÐèҪȥ°ÑÕâ¸öÎļþɾ³ý£©£¬µ«°Ñ³ÌÐòÂß¼·â×°£¬²âÊÔ³ÌÐòʱ£¬²Ù×÷ºóȷʵÈÃÈËÐÄÍ´ÁË£¬ÉõÖÁÓÐ×¼±¸ÉÏÒ»¸öSQL SERVERÈ¥²âÊÔЧÂÊÎÊÌâµÄÄîÍ·¡£×îºó¾¼¼Êõ
×Ü
¼àµãÁËһϣ¬ËµÈðѳÌÐòÿ¶Î¼Ó¸öÖ´ÐÐʱ¼äÔÙ¿´¿´¡£ÎÒÕÕ×ö£¬ÔÚupdateÕâÒ»¿éÈ¥½øÐвâÊÔ£¬·¢ÏÖÎÊÌâ²¢²»ÊÇÔÚÕâ¸ö°ÙÍòÌõÊý¾Ý±íÉÏ£¬ÎҾͰÑÁíÒ»¶ÎÉú³ÉÎļþÎÄ
±¾ÎļþµÄ³ÌÐòÄõô£¬²âÊÔÒ»ÇÐÕý³££¬Ò»´Îupdate300Ìõ¼Ç¼ʱ¼äÔÚ0.08Ãë×óÓҾͲÙ×÷ÍêÁË¡£±¾ÒÔΪÎÊÌâÊdzöÔÚÉú³ÉÎı¾ÎļþÉÏ£¬ÇÒÔÚSQLÓï¾äÉϲ»´æ
ÔÚÎÊÌ⣬ÎÒÏë¼´ÊÇÓëMYSQLÎ޹أ¬¾Í°ÑÁíÒ»¶ÎдÎļþÎļþµÄ²Ù×÷ÄõôÁËÏÈ¡£PHPChina ¿ªÔ´ÉçÇøÃÅ»§D[4z�LM3I
{C
~W)[ U/?:s7g8F8e0
½Ó×ÅÎÒÔÙ²âÊÔdelete²¿·ÖÊDz»ÊÇÒ²´æÔÚ×ÅÕâ¸öÎÊÌ⣬×îºóÎÒ°´ÉÏÃæµÄ²½ÖèͬÑùÒ²°Ñɾ³ýÎļþµÄÒ»²¿·Ö³ÌÐòÄõôÁËÏÈ£¬ÔÙ¿´²âÊÔʱ¼ä£¬·¢ÏÖÎÊÌâÒÀÈ»´æÔÚ£¬ÓôÃÆÁËÒ»»á£¬¼ÌÐø²âÊÔÕâ¶Î´úÂë
¡£Õâ¶Î´úÂëÊÇÒ»¸ö±í¹ØÁª²Ù×÷£¨ÏȲéѯºóɾ³ý£©£¬²âÊÔ·¢ÏÖÕâ¸ö¹ØÁª²Ù×÷»¨ÁË7ÃëÖÓʱ¼ä¡£ÎÒÏ룬һ¸öÒ»¸ö²ð¿ªÊÔ£¬ÆäÖÐÎÒÓÖ²ð·Ö²âÊÔ£¬°Ñɾ³ýµÄSQLÓï¾ä²¿·ÖÄõô£¬ÔÙ¿´²éѯ²¿·ÖµÄʱ¼ä²âÊÔ£¬½á¹û½ö²éѯ²¿·Ö»¨È¥ÁË5Ãë¡£ÎҾͷ¢ÏÖÎÊÌâ¿Ï¶¨ÊdzöÔÚÁ˲éѯÓï¾äÉÏÁË¡£PHPChina ¿ªÔ´ÉçÇøÃÅ»§n{Tx/J2UWe2Vua
-Q&OG`1z-NP1b2?0
ÎÒ
¸Ò¿Ï¶¨ÎÊÌâ³öÔÚ²éѯÓï¾äÉÏÁ˺ó£¬ÎÒ¾ÍÖ±½Óµ½mysql-frontÉÏÈ¥×ö¸ö²éѯ²âÊÔ£¬ÔÚÕâ¸ö°ÙÍòÌõ¼Ç¼ÀïÈ¥²éѯһÌõ·ûºÏÌõ¼þµÄ¼Ç¼ÊÔÊÔ¡£½á¹û²»³öËùÁÏ£¬²é
ѯ½á¹ûÊÇÒ»Ìõ¼Ç¼£¬È´»¨ÁË4.76Ãëʱ¼ä¡£ÎÒÐÄÏ룺²»ÊÇ°É£¬Õâ¾ÍÊÇ´«ËµÖеĿìËÙ²éѯµÄMYSQL£¿£¿ÎÒ¿ªÊ¼»ØÒäÁË£¬ÒÔÇ°¿´ÊéµÄʱºòMYSQLÓÅ»¯µÈÄÚÈÝ¡£
ͻȻÏëµ½Ë÷Òý£¿Á¢¿ÌΪһ¸ö¾³£ÐèÒªwhereµÄ×ֶν¨Á¢ÁËÒ»¸öË÷Òý£¬È»ºóͬÑùµÄSQLÓï¾äÔÙ×ö²âÊÔ£¬Õâ´Î½öÖ»»¨ÁË0.04Ãë¡£¶ÙʱͷÄÔÇåÐÑÁËÒ
Ïà¹ØÎĵµ£º
//Ö÷¼ü
alter table tabelname add new_field_id int(5) unsigned default 0 not null auto_increment ,add primary key (new_field_id);
//Ôö¼ÓÒ»¸öÐÂÁÐ
alter table t2 add d timestamp;
alter table infos add ex tinyint not null default '0';
//ɾ³ýÁÐ
alter table t2 drop column c;
//ÖØÃüÃûÁÐ
......
http://www.developer.com/java/data/article.php/3417381/Using-JDBC-with-MySQL-Getting-Started.htm#Preface
Preface
Purpose
The purpose of this lesson is to get you beyond the initial hurdles involved in:
Downloading and installing a MySQL database server.
Preparing that database for use with JDBC ......
ÄÚÈÝ£º
*************
1
°²×°£Í£Ù£Ó£Ñ£Ìºó¸ü¸ÄÁˣңϣϣԵÄÃÜÂëºóÓÃ
net startmysql
Æô¶¯Ê±ÎÒ¾ÍÓöµ½ÁËÕâÑùµÄÎÊÌ⣮ʹÓÃÒÔÏÂÃüÁîºó
c:\mysql\bin\mysqladmin-u root -p shutdown
ÔÙnet start mysql¾ÍûÓÐÕâ¸ö´íÎóÌáʾÁË!
*************
2
MySQLµÄ1067´íÎó
Q£ºÎÒµÄMysqlÅöµ½ÁË 1067 ´íÎó
´íÎóÐÅϢΪ£º
......
Dos½øÈëMySqlµÄbinĿ¼,Ö´ÐУºmysqldump -hÔ¶³ÌÊý¾Ý¿âIP Êý¾Ý¿âÃû×Ö -uÔ¶³ÌÊý¾Ý¿âÓû§Ãû -pÔ¶³ÌÊý¾Ý¿âÃÜÂë --add-drop-table | mysql ±¾µØÊý¾Ý¿âÃû×Ö -u±¾µØÊý¾Ý¿âÓû§Ãû -p±¾µØÊý¾Ý¿âÃÜÂë
ÔÚ¾ÖÓòÍøÄÚ²âÊԳɹ¦ ......
Java ¶ÁÈ¡ MySQL ÖÐÎÄ ÂÒÂë
³¡¾°:Java,eclipse£¬¶ÁÈ¡MySQLÊý¾Ý¿â£¬MySQL±àÂëΪutf-8
ÎÊÌ⣺¶Á³öÀ´µÄÖÐÎÄÔÚeclipseµÄÊä³ö´°¿ÚÖÐÏÔʾΪÂÒÂë
´íÎóµÄд·¨
1
System.out.print(new String( rs.getString("bib_author").getBytes("utf-8"),"GBK" ));
2
System.out.print( ......