java µ÷ÓÃÃüÁî ±¸·ÝmysqlÊý¾Ý¿â
´úÂëÈçÏ£º
1 String command = " cmd /c C:/Program Files/MySQL/MySQL Server 5.0/bin>mysqldump -h localhost -u root -p aijia > E:/aijia.dmp " ;
2 try {
3 Process process = Runtime.getRuntime().exec(command);
4 InputStreamReader ir = new InputStreamReader(process
5 .getInputStream());
6 LineNumberReader input = new LineNumberReader(ir);
7 String line;
8 while ((line = input.readLine()) != null )
9 System.out.println(line);
10 input.close();
11 } catch (IOException e) {
12 e.printStackTrace();
13 }
14
15
16
17
18 ÁíÍâ
19
20 Ê×ÏÈ£¬ÉèÖÃmysqlµÄ»·¾³±äÁ¿£¨ÔÚpathÖÐÌí¼Ó % MYSQL_HOME % \bin£©£¬ÖØÆôµçÄÔ¡£
21 ÍêÕû´úÂ룺
22 /** */ /**
23 * @param args
24 */
25 public static void main(String[] args) {
26 /**/ /*
27 * ±¸·ÝºÍµ¼ÈëÊÇÒ»¸ö»¥ÄæµÄ¹ý³Ì¡£
28 * ±¸·Ý£º³ÌÐòµ÷ÓÃmysqlµÄ±¸·ÝÃüÁ¶Á³ö¿ØÖÆ̨ÊäÈëÁ÷ÐÅÏ¢£¬Ð´Èë.sqlÎļþ£»
29 &nbs
Ïà¹ØÎĵµ£º
¡¶javaÓïÑÔ³ÌÐòÉè¼Æ£¨Ò»£©¡·2009Äê×Ôѧ¿¼ÊÔ´ó¸ÙµÚ3ÕÂ
www.wesiedu.com 2009-5-5 ÔÚÏßÄ£Ä⿼³¡
µÚ3Õ ÃæÏò¶ÔÏó±à³Ì»ù´¡
(Ò»)¿Î³ÌÄÚÈÝ
3.1 ÃæÏò¶ÔÏóµÄ»ù±¾¸ÅÄî
3.2 JavaµÄÀàºÍ¶ÔÏó
3.2.1 Àà
3.2.2¶ÔÏó
3.2.3ʵÀý±äÁ¿ºÍÀà±äÁ¿
3.2.4ʵÀý·½·¨ºÍÀà·½·¨
3.2.5·ÃÎÊȨÏÞ
3.2.6¼Ì³Ð
3.2.7 Java ......
from:http://www.ccvita.com/100.html
mysql 5.0´æ´¢¹ý³Ìѧϰ×ܽá
Ò».´´½¨´æ´¢¹ý³Ì
1.»ù±¾Óï·¨£º
create procedure sp_name()
begin
………
end
2.²ÎÊý´«µÝ
¶þ.µ÷Óô洢¹ý³Ì
1.»ù±¾Óï·¨£ºcall sp_name()
×¢Ò⣺´æ´¢¹ý³ÌÃû³ÆºóÃæ±ØÐë¼ÓÀ¨ºÅ£¬ÄÄŸô洢¹ý³ÌûÓвÎÊý´«µÝ
Èý.ɾ³ý´æ´¢¹ý³Ì
1 ......
1.ʲô½Ð×ö×Ö·û¼¯
×Ö·û¼¯¾ÍÊÇÒ»Ì×·ûºÅºÍ×Ö·û±àÂëµÄ¼¯ºÏ¡£
2.ʲô½Ð×öУ¶Ô¹æÔò
У¶Ô¹æÔò¾ÍÊÇÔÚ×Ö·û¼¯ÄÚÓÃÓڱȽÏ×Ö·ûµÄÒ»Ì×¹æÔò¡£
MYSQL5.1Êý¾Ý¿â¿ÉÒÔ×öµ½
· ʹÓöàÖÖ×Ö·û¼¯À´´æ´¢×Ö·û´®
· ʹÓöàÖÖУ¶Ô¹æÔòÀ´±È½Ï×Ö·û´®
· ÔÚͬһ̨·þÎñÆ÷¡¢Í¬Ò»¸öÊý¾Ý¿â»òÉõ ......
²Ù×÷Êý¾Ý¿â
µÇ¼µ½mysqlÖУ¬È»ºóÔÚmysqlµÄÌáʾ·ûÏÂÔËÐÐÏÂÁÐÃüÁÿ¸öÃüÁîÒԷֺŽáÊø¡£
1¡¢ ÏÔʾÊý¾Ý¿âÁÐ±í¡£
show databases;
ȱʡÓÐÁ½¸öÊý¾Ý¿â£ºmysqlºÍtest¡£ mysql¿â´æ·Å×ÅmysqlµÄϵͳºÍÓû§È¨ÏÞÐÅÏ¢£¬ÎÒÃǸÄÃÜÂëºÍÐÂÔöÓû§£¬Êµ¼ÊÉϾÍÊǶÔÕâ¸ö¿â½øÐвÙ×÷¡£
2¡¢ ÏÔʾ¿âÖе ......