Mysql data to long´íÎóµÄ´¦Àí·½·¨
½ñÌìÔÚдʵϰÉúµÄÅàѵPPTʱ£¬ÓÃmysqlµÄcommand line client²åÈëÒ»Ìõ´øÖÐÎĵļǼʱ£¬±¨data to longµÄ´íÎó£¬
ÔÚÍøÉϲ鿴ÁËÏà¹Ø×ÊÁÏ£¬ËµµÄÊÇÒòΪÕâ¸öconsoleʹÓÃÁËÒ»ÖÖ±àÂ뷽ʽ£¬°ÑÃüÁî±àÂëºóÔÙ·¢Ë͵½Êý¾Ý¿â£¬¾ßÌåÇë²Î¿´http://www.cnblogs.com/ovliverlin/archive/2007/11/26/972549.html£¬ËµµÄ±È½ÏÏêϸ£¬±¾ÈË¿´Íêºó£¬Ö±½ÓÊäÈë
set names gbkÃüÁîÒ²°ÑÎÊÌâ½â¾öÁË¡£
Ïà¹ØÎĵµ£º
²éѯÊÇÊý¾Ý¿â¼¼ÊõÖÐ×î³£ÓõIJÙ×÷¡£²éѯ²Ù×÷µÄ¹ý³Ì±È½Ï¼òµ¥£¬Ê×ÏÈ´Ó¿Í»§¶Ë·¢³ö²éѯµÄSQLÓï¾ä£¬Êý¾Ý¿â·þÎñ¶ËÔÚ½ÓÊÕµ½ÓÉ¿Í»§¶Ë·¢À´µÄSQLÓï¾äºó£¬ Ö´ÐÐÕâÌõSQLÓï¾ä£¬È»ºó½«²éѯµ½µÄ½á¹û·µ»Ø¸ø¿Í»§¶Ë¡£ËäÈ»¹ý³ÌºÜ¼òµ¥£¬µ«²»Í¬µÄ²éѯ·½Ê½ºÍÊý¾Ý¿âÉèÖ㬶ԲéѯµÄÐÔÄܽ«»áÓкÜÔÚµÄÓ°Ïì¡£
Òò´Ë£¬±¾ÎľÍÔÚMySQLÖг£ÓõIJéѯÓÅ»¯¼¼Êõ½ ......
ÔÚmysqlÖÐÀûÓÃselectÓï¾äµÄÒ»¸öÌØÐԾͿÉÒԺܷ½±ãµØʵÏÖ²éѯ½á¹ûµÄ·ÖÒ³£¬selectÓï¾äµÄÓï·¨£º
SELECT [STRAIGHT_JOIN] [SQL_SMALL_RESULT] [SQL_BIG_RESULT] [HIGH_PRIORITY]
[DISTINCT | DISTINCTROW | ALL]
select_expression,...
[INTO OUTFILE 'file_name'&nb ......
ת×Ô http://www.supidea.com/post/mysql_design_database.aspx
MySQLÊý¾Ý¿âÉè¼ÆÔÔò
MySQL¶ÔÓÚ³ÉΪһ¸ö·Ç³£¿ìËÙµÄÊý¾Ý¿â·þÎñÆ÷ÓÐ×ŵ±Ö®ÎÞÀ¢µÄÃûÉù£¬ËüÒ²·Ç³£ÈÝÒ×ÉèÖúÍʹÓá£Ëæ×ÅËü×÷ΪÍøÕ¾ºó¶ËÊý¾Ý¿âµÃÉùÍûÈÕÔö£¬ÆäЧ¹ûÔÚÈ¥Ä꿪ʼÓÐÃ÷ ÏÔÌá¸ß¡£µ«ÊǺܶàMySQLÓû§¸ü¶àµØÖªµÀÈçºÎ´´½¨Ò»¸öÊý¾Ý¿â²¢±àд¶ÔËüµÄ²éѯ¡£¾ÍÏñ³ÉÇ ......
ÃüÁʽµÄ.×¢ÒâÿÐкó±ß¶¼¸ú¸ö £» ±íʾһ¸öÃüÁîÓï¾ä½áÊø.
¸ñʽ£ºgrant select on Êý¾Ý¿â.* to
Óû§Ãû@µÇ¼Ö÷»ú identified by "ÃÜÂë"
Àý1¡¢Ôö¼ÓÒ»¸öÓû§test1ÃÜÂëΪabc£¬ÈÃËû¿ÉÒÔÔÚÈκÎÖ÷»úÉϵǼ£¬²¢¶ÔËùÓÐÊý¾Ý¿âÓвéѯ¡¢²åÈë¡¢Ð޸ġ¢É¾³ýµÄȨÏÞ¡£Ê×ÏÈÓÃÒÔ
rootÓû§Á¬ÈëMYSQL
£¬
È»ºó¼üÈëÒÔÏÂÃüÁ
gr ......
<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<%
//Á¬½ÓÊý¾Ý¿â
try
{
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
Connection connection= java.sql.DriverManager.getConnection("jdbc:mysql://localhost/dangyuan","root", ......