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

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.getConnection(strUrl, strUser, strPassword);
   Statement rs=conn.createStatement();
   String strSqlInsert="insert into tblScore (Name,Class,Score) values ('"+strName+"','"+strClass+"','"+strScore+"')";
   int iResult=rs.executeUpdate(strSqlInsert);
   if(iResult!=0)
   {
    out.println("Ìí¼Ó³É¹¦£¡");
   }
   else
   {
    out.println("Ìí¼Óʧ°Ü£¡");
   }
µ¼Èëjar°ü£¬È»ºóÔõôµ÷ÊÔ¶¼ÊdzöÏÖ
java.lang.ClassNotFoundException: com.mySql.jdbc.Driver£¬
Ö´Ðе½µÚÒ»²½¾Í³ö´í£¬
ÉÏmysqlÍøÕ¾ÏÂ×îеÄÇý¶¯£¬»¹ÊDz»ÐУ¬
ÓôÃÆÖ®¼«£¬×îºó·¢ÏÖʱ´óСдµÄÎÊÌ⣬
µÚÒ»¾äÓ¦¸ÃÊÇ
Class.forName("com.mysql.jdbc.Driver");


Ïà¹ØÎĵµ£º

MYSQLÏÔʾÃüÁî

 1¡¢ÏÔʾÊý¾Ý¿âÁÐ±í¡£
show databases;
¸Õ¿ªÊ¼Ê±²ÅÁ½¸öÊý¾Ý¿â£ºmysqlºÍtest¡£mysql¿âºÜÖØÒªËüÀïÃæÓÐMYSQLµÄϵͳÐÅÏ¢£¬ÎÒÃǸÄÃÜÂëºÍÐÂÔöÓû§£¬Êµ¼ÊÉϾÍÊÇÓÃÕâ¸ö¿â½øÐкÃ×÷¡£
2¡¢ÏÔʾ¿âÖеÄÊý¾Ý±í£º
use mysql£» £¯£¯´ò¿ª¿â£¬Ñ§¹ýFOXBASEµÄÒ»¶¨²»»áÄ°Éú°É
show tables;
3¡¢ÏÔʾÊý¾Ý±íµÄ½á¹¹£º
describe ±í ......

MySQL ÃüÁîÐÐ

 MySQL ÃüÁîÐÐ
µÚÒ»ÕС¢mysql·þÎñµÄÆô¶¯ºÍÍ£Ö¹
net stop mysql
net start mysql
µÚ¶þÕС¢µÇ½mysql
Óï·¨ÈçÏ£º mysql -uÓû§Ãû -pÓû§ÃÜÂë
¼üÈëÃüÁîmysql -uroot -p£¬ »Ø³µºóÌáʾÄãÊäÈëÃÜÂ룬ÊäÈë12345£¬È»ºó»Ø³µ¼´¿É½øÈëµ½mysqlÖÐÁË£¬mysqlµÄÌáʾ·ûÊÇ£º
mysql>
×¢Ò⣬Èç¹ûÊÇÁ¬½Óµ½ÁíÍâµÄ»úÆ÷ÉÏ£¬ÔòÐèÒª¼ÓÈ ......

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ÎÊÌâÌù1£º MysqlÂÒÂëÎÊÌâ½â¾ö·½°¸

 
×Ô¼º½â¾ö°ì·¨£ºÔÚmy.iniÖн«Á½´¦latin1¸Ä³Éutf8¼´¿É
Ò»¡¢ÂÒÂë²úÉúÔ­Òò
MySQL ×Ö·û±àÂëÊÇ°æ±¾4.1ÒýÈëµÄ£¬Ö§³Ö¶à¹úÓïÑÔ£¬¶øÇÒһЩÌØÐÔÒѾ­³¬¹ýÁËÆäËü´ó¶àÊýÊý¾Ý¿â¹ÜÀíϵͳ¡£ÕýÒòΪÕâÒ»ÌØÐԲŵ¼Ö MySQL µÄÂÒÂëÎÊÌâ¡£
×Ö·û¼¯ÊÇÒ»Ì×·ûºÅºÍ±àÂ롣У¶Ô¹æÔòÊÇÔÚ×Ö·û¼¯ÄÚÓÃÓڱȽÏ×Ö·ûµÄÒ»Ì×¹æÔò¡£ÈÃÎÒÃÇʹÓÃÒ»¸ö¼ÙÏë×Ö·û ......

CentOSÏÂMySql 5.0.xµÄ°²×°¡¢ÓÅ»¯¼°°²È«ÉèÖÃ

 groupadd mysql
н¨Ò»¸öÃûΪmysqlµÄÓû§×é
useradd -g mysql mysql
ÔÚmysqlÓû§×éÏÂн¨Ò»¸öÃûΪmysqlµÄÓû§
gunzip ½âѹÏÂÔص½µÄ.gzÎļþ
cd mysql-VERSION
½øÈë½âѹºóµÄĿ¼
CFLAGS="-O3 -mcpu=pentium4" CXX=gcc CXXFLAGS="-O3 -march=pentium4 -felide-constructors -fno-exceptions -fno-rtti" ./configu ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ