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

½«ExcelÊý¾Ýµ¼ÈëMySql

½«ExcelÊý¾Ýµ¼ÈëMySql
 
1.½«Ñ¡ÖеÄÊý¾Ý¿ì¶ù¿½±´µ½Ò»¸öTXTÎı¾ÎļþÖУ¨¼ÇµÃ°ÑºóÃæµÄ¿Õ¸ñÏûµô¡£¡££©£¬¼ÙÈç´æµ½“D:\data.txt”Õâ¸öλÖÃÀï¡£
2.¸ù¾ÝÒªµ¼ÈëµÄÊý¾Ý¿ì¶ù½¨Á¢MySqlÊý¾Ý¿âºÍ±í£¬È»ºó½øÈëÃüÁîÌáʾ·ûÀïʹÓÃÃüÁî
load data local infile 'D:\data.txt' into table exceltomysql fields terminated by '\t';
 ½øÐе¼Èë²Ù×÷
¾ßÌ廹ÊDzο¼¸ßÊֵģº
http://hi.baidu.com/harite/blog/item/6a5fb9de55e6f258ccbf1adf.html
·Ç³£¸Ðл£¬×Ô¼ºÒ²×ö¸ö±Ê¼Ç
 
 
ÊÖ¶¯½øÐÐExcelÊý¾ÝºÍMySqlÊý¾Ýת»»
 
 
    ¼ÙÈçÒª°ÑÈçͼËùʾµÄExcel±í¸ñµ¼Èëµ½MySqlÊý¾Ý¿âÖУ¬Èçͼ£º
£¬
²½ÖèÒ»£º
Ñ¡È¡Òªµ¼ÈëµÄÊý¾Ý¿ì¶ù£¬ÁíÍâÒª¶à³öÒ»ÁУ¬ÈçÏÂͼ£º
²½Öè¶þ£º
½«Ñ¡ÖеÄÊý¾Ý¿ì¶ù¿½±´µ½Ò»¸öн¨µÄ±í¸ñ¹¤×÷±¡£¬È»ºó“Áí´æΪ” £­¡·“Îı¾Îļþ(ÖƱí·û·Ö¸î)(*.txt)”£¬¼ÙÈç´æµ½“D:\data.txt”Õâ¸öλÖÃÀï¡£Èçͼ£º
²½ÖèÈý£º
¸ù¾ÝÒªµ¼ÈëµÄÊý¾Ý¿ì¶ù½¨Á¢MySqlÊý¾Ý¿âºÍ±í£¬È»ºóʹÓÃÃüÁî
load data local infile 'D:\data.txt' into table exceltomysql fields terminated by '\t';
½øÐе¼Èë²Ù×÷¡£ÈçÏÂͼ£º
ÏÖÔÚÊý¾ÝÒѾ­È«²¿µ¼Èëµ½MySqlÀïÁË£¬
ÈÃÎÒÃÇÀ´selectһϰɣ¬Èçͼ£º
µ½´Ë£¬Êý¾ÝÓÉExcelµ½MySqlµÄת»»ÒѾ­Íê³É¡£
ÏÂÃæ˵Ï£¬Êý¾Ý´ÓMySqlµ½ExcelµÄת»¯£¬Æä¹ý³ÌÆäʵ»¹ÊǽèÖúÄǸö“ÖƱí·û·Ö¸î”µÄÎı¾Îļþ¡£
½«ÈçÒª½«Õâ¸ö±íÖеÄÄÐÉúÐÅÏ¢µ¼Èëµ½ExcelÖУ¬¿ÉÒÔÕâÑù¡£
select * into outfile 'D:\man.txt' from exceltomysql where xingbie="ÄÐ";
Èçͼ£º


Ïà¹ØÎĵµ£º

Mysql ÃüÁîʵÀý

1. Mysql Åàѵ
1.1. ÅàѵĿµÄ
±¾ÎĵµÊÇÕë¶ÔMySQL Êý¾Ý¿â·½ÃæµÄ»ù´¡Åàѵ£¬ÎªÁËʹÏîÄ¿×é³ÉÔ±Äܹ»´ïµ½Ê¹ÓÃMySQL Êý¾Ý¿âµÄÄ¿µÄ¡£
1.2. Åàѵ¶ÔÏó
¿ª·¢ÈËÔ±
1.3. ³£Óôʼ°·ûºÅ˵Ã÷
³£Óôʣº
Mysql£ºÒ»ÖÖÃâ·ÑµÄ¿çƽ̨µÄÊý¾Ý¿âϵͳ
E:\mysql£º±íʾÊÇÔÚdos ÃüÁî´°¿ÚÏÂÃæ
mysql> ±íʾÊÇÔÚmysql µÄÃüÁîÐÐÏÂ
1.4 ......

mysqlÖÐÎÄÂÒÂëÎÊÌâµÄ½â¾ö·½·¨£¬¾­Êµ¼Ê¼ìÑé¿ÉÒÔÓõÄ

ÍøÉϵĽâ¾ö·½·¨´ó¶àÊÇÒªÐÞ¸ÄmysqlÅäÖÃÎļþ£¬¶ÔÎÒÃDz»Êʺϡ£jhostÖ÷Ò³ÉÏ¿´µ½ÆªÎÄÕ£¬µ«ÀïÃæ˵µÄÇý¶¯Ôç¾ÍÊÇÀÏÇý¶¯ÁË£¬»³ÒÉËûÊÇ´ÓÍøÉϸ´ÖƹýÀ´µÄÀÏ°æ±¾£¬²»ÖªÊÇ·ñÄÜÓá£ÏÖÔÚ°ÑÎÒ×Ô¼ºµÄ½â¾ö·½°¸Ìù³öÀ´£¬¹©´ó¼Ò²Î¿¼£¬»¶Ó­ÅúÆÀÖ¸Õý¡£
´ó¼Ò×¢ÒâºìÉ«²¿·Ö£¬·Ï»°²»¶à˵£º
µÚÒ»²½£ºÍøҳͷÉèÖãº
<%@ page contentType="text/html ......

¸ù¾ÝstatusÐÅÏ¢¶ÔMySQL·þÎñÆ÷½øÐÐÓÅ»¯

¡¡ÍøÉÏÓкܶàµÄÎÄÕ½ÌÔõôÅäÖÃMySQL·þÎñÆ÷£¬µ«¿¼Âǵ½·þÎñÆ÷Ó²¼þÅäÖõIJ»Í¬£¬¾ßÌåÓ¦ÓõIJî±ð£¬ÄÇЩÎÄÕµÄ×ö·¨Ö»ÄÜ×÷Ϊ³õ²½ÉèÖòο¼£¬ÎÒÃÇÐèÒª¸ù¾Ý×Ô¼ºµÄÇé¿ö½øÐÐÅäÖÃÓÅ»¯£¬ºÃµÄ×ö·¨ÊÇMySQL·þÎñÆ÷Îȶ¨ÔËÐÐÁËÒ»¶Îʱ¼äºóÔËÐУ¬¸ù¾Ý·þÎñÆ÷µÄ”״̬”½øÐÐÓÅ»¯¡£
mysql> show global status;
¡¡¡¡¿ÉÒÔÁгöMySQL·þÎ ......

fedora12Ï°²×°apache+php+mysql(LAMP)+phpmyadmin

1 °²×°MySQL5
ÓÃÏÂÁÐÃüÁî°²×°MySQL£º
yum install mysql mysql-server
È»ºóÎÒÃÇΪMySQL´´½¨ÏµÍ³Æô¶¯Á´½Ó£¨ÕâÑùµÄ»°£¬MySQL¾Í»áËæ×ÅϵͳÆô¶¯¶øÆô¶¯£©£¬²¢Æô¶¯MySQL·þÎñÆ÷£º
chkconfig –levels 235 mysqld on
/etc/init.d/mysqld start
ÔËÐÐ
mysqladmin -u root password yourrootsqlpassword
À´ÎªrootÓû§ÉèÖà ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ