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

ʹÓÃJavaʵÏÖ¶ÔMySqlÊý¾Ý¿âµÄµ¼ÈëÓëµ¼³ö

package com.project.ajaxs;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.util.Calendar;
import java.util.Date;
public class BakMysql {
//mainµÄ·½·¨£¬Ö÷ÒªÊÇÎÒÓÃÓÚ²âÊԵģ¬ÊÇÏë×ÅÈ¡µÃCLASSµÄ·¾¶£¬È»ºó±¸·ÝµÄÎļþдÔÚ·þÎñÆ÷µÄÀà·¾¶ÏÂ
public static void main(String[] args) {
BakMysql bk = new BakMysql();
  
        bk.backup();
    // bk.load();
     }
   //backup·½·¨ÊDZ¸·ÝÊý¾Ý¿âµ½·þÎñÆ÷µØÖ·
     public void backup() {
     Calendar now = Calendar.getInstance();
     String name = now.getTime()+""+(now.getTime().getMonth()+1)+""+now.getTime().getDate();
     String filename = name.substring(24)+" "+name.substring(11,13)+""+name.substring(14,16)+""+name.substring(17,19);
         try {
         String filePath ="e:/project"+filename+".sql";
             Runtime rt = Runtime.getRuntime();
             // µ÷Óà mysql µÄ cmd:
             Process child = rt.exec("C:/Program Files/MySQL/MySQL Server 5.0/bin/mysqldump.exe -uroot -p8095longchun project");// ÉèÖõ¼³ö±àÂëΪutf8¡£ÕâÀï±ØÐëÊÇutf8
            //×¢ÒâÕâÒ»¾ä£¬ÊÇÖ¸ÔËÐÐmysqldumpÃüÁºóÃæ¸úµÄÊǵǼÃûºÍµÇ¼µÄÃÜÂ룬½ÓןóÃæµÄÊÇÖ¸±¸·ÝµÄÊý¾Ý¿âµÄÃû×Ö£¬µ½´Ë½áÊø£¬ÒÔ´ËÉú³ÉÒ»¸öÖ´ÐеĽø³Ì£¬È¡µÃ´Ë½ø³ÌµÄÊä³öÁ÷µ½ÎÒÃÇÒª±¸·ÝµÄÎļþ
             // °Ñ½ø³ÌÖ´ÐÐÖеĿØÖÆ̨Êä³öÐÅϢдÈë.sq


Ïà¹ØÎĵµ£º

Java Ö´ÐÐ SQL ½Å±¾Îļþ

ÊÇ¿½±´µÄ±ðÈ˵ģ¬ÒÔ±¸Ñ§Ï°
package com.unmi.db;
import java.io.FileInputStream;
import java.io.InputStream;
import java.sql.Connection;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* ¶ÁÈ¡ SQL ½Å±¾²¢Ö´ÐÐ
* @author Unmi
*/
pub ......

redflag5.0°²×°Apache+MySQL+PHPʵ¼

LinuxÅäÖÃAPACHE2.2.4 + PHP5.2.1 + MYSQL5.0.37 + GD¿â
µÚÒ»²½£º°²×°RedFlag Linux5.0
°²×°ÏµÍ³Ê±ÇëÎñ±Ø°²×°¿ª·¢¹¤¾ß°üºÍKDE¿ª·¢¹¤¾ß°ü£¬WWW·þÎñÆ÷ºÍSQL·þÎñÆ÷²»Òª°²×°£¬·ñÔò¿ÉÄÜ»á³öÏÖδ֪µÄ´íÎó¡£
µÚ¶þ²½£ºÈ·¶¨linuxϵͳÊÇ·ñ°²×°gcc±àÒëÆ÷
Ê×ÏÈ,GCCÒªÓÐ,²»È»Ê²Ã´¶¼²»ÄÜ×ö.¿ÉÒÔÓÃgcc -vÀ´²é¿´ÊÇ·ñ°²×°ÁËGCC,
#gcc - ......

jsp—MySqlÖÆ×÷B/sµÇ½µÄºÃÀý×Ó Ñ§Ï°±Ê¼Ç

½¨Á¢Ìõ¼þÊ×ÏÈÒ»¶¨ÒªÈ·¶¨×Ô¼ºµÄmysql£¬tomcat,eclipseÁ¬½ÓÊÇÕýÈ·µÄ¡£
index.jspºÜ¼òµ¥£¬¾ÍÒ»¸öÌøת¡£
<%
response.sendRedirect("lg.jsp");
%>
lg.jsp ʵÏֵǼ¿ò¼Ü
<%@ page contentType="text/html; charset=utf-8" %>
<html>
<head>
<title>
login
</title>
</hea ......

JavaʵÏÖͨÓÃÏ̳߳Ø

      Ï̳߳ØͨË×µÄÃèÊö¾ÍÊÇÔ¤ÏÈ´´½¨Èô¸É¿ÕÏÐỊ̈߳¬µÈµ½ÐèÒªÓöàÏß³ÌÈ¥´¦ÀíÊÂÎñµÄʱºòÈ¥»½ÐÑijЩ¿ÕÏÐÏß³ÌÖ´Ðд¦ÀíÈÎÎñ£¬ÕâÑù¾ÍÊ¡È¥ÁËƵ·±´´½¨Ï̵߳Äʱ¼ä£¬ÒòΪƵ ·±´´½¨Ïß³ÌÊÇÒªºÄ·Ñ´óÁ¿µÄCPU×ÊÔ´µÄ¡£Èç¹ûÒ»¸öÓ¦ÓóÌÐòÐèҪƵ·±µØ´¦Àí´óÁ¿²¢·¢ÊÂÎñ£¬²»¶ÏµÄ´´½¨Ïú»ÙÏß³ÌÍùÍù»á´ó´óµØ½µµÍϵͳµÄЧÂÊ£ ......

JavaÖжÁÈ¡propertiesÎļþµÄ¼¸ÖÖ·½·¨

¡¡1¡¢Ê¹ÓÃjava.util.ResourceBundleÀàµÄgetBundle()·½·¨
ʾÀý£º
String name = "logging"; // the logging.properties file in src root folder
ResourceBundle rb = ResourceBundle.getBundle(name,Locale.getDefault());
// test the rb
String propertyKey = "xxx";
System.out.println(rb.getString(propert ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ