mysqlÓÃjdbcÁ¬½Ó
Ê×ÏÈ·ÅÖúÃjdbcÇý¶¯³ÌÐò£¬ÔÚ java\jre6\lib\ext\Ï£¬java\jdk1.6\jre\libµÈµØ·½¶¼·ÅÆðÀ´£¬ÒòΪ²»È·¶¨ÔÚÄÄÀïÓÐÓ÷··
Class.forName("com.mysql.jdbc.Driver").newInstance();
String url = "jdbc:mysql://localhost/DATABASENAME?user=USERNAME&password=PASSWORD&useUnicode=true&characterEncoding=8859_1";
Connection conn = DriverManager.getConnection(url);
Statement stmt = conn.createStatement();
----------------------------------------------------------------------
ResultSet rs = stmt.executeQuery("select * from userinfo")
Ïà¹ØÎĵµ£º
1.Ç°ÃæһƪÎÄÕÂÏêϸ½éÉÜÁËÈçºÎÔÚWindowsÏÂÕûºÏapache+mysql+php+tomcat,ºÜ¼òµ¥£¬µ«ÊÇÔÚLinuxϾÍûÕâôÈÝÒ×ÁË£¬ÐèÒªÊÖ¹¤µÄȥдÅäÖÃÎļþ£¬ÍøÉϵÄ×ÊÁÏÓкܶ࣬µ«ÊÇÎÒ¸ù¾ÝËûÃǵÄд·¨£¬Ò»²½Ò»²½µÄÅäÖû¹ÊÇûÄÜsuccess!£¨¿ÉÄÜÊÇÎÒ¸öÈ˵ÄÔÒò£¬²»¹ý£¬ÎÞÂÛÔÚGoogle»¹ÊÇbaiduËѵ½µÄÎÄÕ¾ÍÄÇô¼¸Æª£¬Õâ¸öתһÏ£¬ÄǸöתһÏ£¬×îºó¶¼² ......
1 µ¼³ö:
½øÈëÃüÁîÐÐ: Ö´ÐÐ
mysqldump -u username -p password –all-databases > all.sql
Ïêϸ²ÎÊý:
http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html
2 µ¼Èë
½øÈëmysql -u username -p password
Ö´ÐÐsource all.sql;
......
1.Ëü¿ÉÒÔ±»·ÖΪÈýÀࣺÊý×ÖÀàÐÍÈÕÆÚÀàºÍʱ¼äÀàÐÍ£¬×Ö·û´®ÀàÐÍ¡£
ÁÐÀàÐÍÓÃÓÚÃèÊö:
M£ºÖ¸³ö×î´óµÄÏÔʾ³ß´ç¡£×î´óµÄºÏ·¨ÏÔʾ³ß´çΪ255.
D£ºÊÊÓÃÓÚ¸¡µãÀàÐͲ¢Ö®³õ¸úËæÔÚÊ®½øÖÆСÊýµãºóµÄÊýÂëµÄÊýÁ¿¡£×î´óµÄ¿ÉÄÜÖµÊÇ30£¬µ«ÊDz»Ó¦´óÓÚM.
2.·½À¨ºÅ("[","]")Ö¸³ö¿ÉÑ¡µÄÀàÐÍÐÞÊηûµÄ²¿·Ö£®
£ªÈôÖ¸¶¨ÁËÁÐÀàÐÍΪZEROFILL,MYSQL½«¸Ã ......
ÕâÀ½éÉÜÒ»ÏÂCentOSÏÂMySQLÊý¾Ý¿â·þÎñÆ÷µÄ¹¹½¨·½·¨¡£
°²×°MySQL¼°Ïà¹Ø×é¼þ
¡¡¡¡Ê×ÏÈ£¬°²×°MySQL¡£
[root@sample ~]#
yum
-y install mysql-server
¡¡ ← °²×°MySQL
Setting up Install Process
Setting up repositories
dag 100% |=========================| 1.1 kB 00:00
update ......