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

mysqlÊý¾Ý¿âµÄµ¼³öµ¼Èë

ÎÊÌ⣺һ¿ªÊ¼ÎÒÓÃNavicat Lite for mysql ½«Êý¾Ý¿âת´æ´¢Î»sqlÎļþ¡£´ò¿ªÖ®ºó·¢ÏÖ£¬ÖÐÎĶ¼±ä³ÉÁËÂÒÂë¡£
ËùÒÔ ÔÚÍøÉÏËÑË÷ÁËЩ×ÊÁÏ¿´¿´¡£·¢¾õ´ó¼Ò¶¼ÊÇÓÃÃüÁîµ¼³öµÄ¡£ÓÃÁËÖ®ºó£¬ÖÐÎľͲ»ÂÒÂëÁË¡£½â¾öÁËÎÒµÄÒ»¸öÄÑÌâ¡£Ìش˼ÇÏ¡£
·½·¨:
Ê×ÏÈÈ·ÈÏ mysql·þÎñÊÇ¿ªÆôµÄ¡£
È»ºóµã“¿ªÊ¼”ÔËÐÐÊäÈëcmd£¬½øÈëDOS»·¾³¡£cdµ½mysql/binĿ¼
Ò»¡¢±¸·ÝÊý¾Ý¿â£º£¨ÃüÁîÔÚDOSµÄmysql\binĿ¼ÏÂÖ´ÐУ©
mysqldump --opt school>school.bbb
×¢ÊÍ:½«Êý¾Ý¿âschool±¸·Ýµ½school.bbbÎļþ£¬school.bbbÊÇÒ»¸öÎı¾Îļþ£¬ÎļþÃûÈÎÈ¡£¬´ò¿ª¿´¿´Äã»áÓÐз¢ÏÖ¡£
1.µ¼³öÕû¸öÊý¾Ý¿â
mysqldump -u Óû§Ãû -p Êý¾Ý¿âÃû > µ¼³öµÄÎļþÃû
mysqldump -u root -p aikersql> aiker.sql£¨sqlÎļþÔÚbinĿ¼±»´´½¨£©
2.µ¼³öÒ»¸ö±í
mysqldump -u Óû§Ãû -p Êý¾Ý¿âÃû ±íÃû> µ¼³öµÄÎļþÃû
mysqldump -u aiker -p aikersql users> aiker_users.sql
3.µ¼³öÒ»¸öÊý¾Ý¿â½á¹¹
mysqldump -u root -p -d --add-drop-table aikersql>d:\aiker_db.sql
-d ûÓÐÊý¾Ý --add-drop-table ÔÚÿ¸öcreateÓï¾ä֮ǰÔö¼ÓÒ»¸ödrop table
¶þ.µ¼ÈëÊý¾Ý¿â
³£ÓÃsource ÃüÁî
½øÈëmysqlÊý¾Ý¿â¿ØÖÆ̨£¬Èçmysql -u root -p
mysql>use Êý¾Ý¿â
È»ºóʹÓÃsourceÃüÁºóÃæ²ÎÊýΪ½Å±¾Îļþ£¨ÈçÕâÀïÓõ½µÄ.sql£©
mysql>source d:\aiker_db.sql
Ò²¿ÉÒÔÓà mysql -uroot -Ddb1 <d:\aiker_db.sql
Èý¡¢½«Îı¾Êý¾Ýתµ½Êý¾Ý¿âÖÐ
1¡¢Îı¾Êý¾ÝÓ¦·ûºÏµÄ¸ñʽ£º×Ö¶ÎÊý¾ÝÖ®¼äÓÃtab¼ü¸ô¿ª£¬nullÖµÓÃnÀ´´úÌæ.
Àý£º
3 rose ÉîÛÚ¶þÖÐ 1976-10-10
4 mike ÉîÛÚÒ»ÖÐ 1975-12-23
2¡¢Êý¾Ý´«ÈëÃüÁî load data local infile "ÎļþÃû" into table ±íÃû;
×¢Ò⣺Äã×îºÃ½«Îļþ¸´ÖƵ½mysqlbinĿ¼Ï£¬²¢ÇÒÒªÏÈÓÃuseÃüÁî´ò±íËùÔڵĿ⡣
Êý¾Ýµ¼³ö
¡¡¡¡Êý¾Ýµ¼³öÖ÷ÒªÓÐÒÔϼ¸ÖÖ·½·¨£º
¡¡¡¡Ê¹ÓÃselect into outfile "filename"Óï¾ä
¡¡¡¡Ê¹ÓÃmysqldumpʵÓóÌÐò
ʹÓÃphpmyadminµ¼Èë
ÀýÈ磺mysql> select * from driver into outfile "a.txt";
µ¼Èë
¡¡¡¡Í¬µ¼³öÏàÀàËÆ£¬µ¼ÈëÒ²ÓÐÁ½ÖÖ·½·¨£º
ʹÓÃLOAD DATA INFILE "filename"ÃüÁî
ʹÓÃmysqlimportʵÓóÌÐò
ʹÓÃphpmyadminµ¼Èë
ʹÓÃsqlÎļþ
±¾ÎÄÀ´×ÔCSDN²©¿Í£¬×ªÔØÇë±êÃ÷³ö´¦£ºhttp://blog.csdn.net/lonesomer/archive/2006/05/04/708193.aspx


Ïà¹ØÎĵµ£º

¡¾×ª¡¿mysqlÏÂÈçºÎÖ´ÐÐsql½Å±¾

Ê×Òª²½Öè(Ò»°ã¿ÉÊ¡ÂÔ):
¿ªÆômysql·þÎñ(ĬÈÏÊÇ¿ª»úʱ¾Í×Ô¶¯ÔËÐÐÁË):
¿ØÖÆÃæ°å
-->¹ÜÀí¹¤¾ß-->·þÎñ,ÔÚÀïÃæÕÒµ½Ãû³ÆΪmysqlµÄÏî,Ë«»÷¾Í¿É¿´ËüµÄ·þÎñ״̬ÊÇÆô¶¯»¹ÊÇÍ£Ö¹,°ÑËüÉèΪÆô¶¯
Á¬½Ómysql:
ÔÚÃüÁîÐÐÏÂÊäÈë mysql -h
localhost -u root -p»Ø³µ,È»ºóÊäÈëÃÜÂë¼´¿É;»òÖ±½ÓÔËÐÐmysql×Ô´øµÄÁ¬½Ó¹¤¾ß,È»ºóÊäÈëÃÜÂë¼ ......

MSSQL ʵÏÖ MySQL µÄ limit ²éѯ·½Ê½

MSSQL ÈçºÎʵÏÖ MySQL µÄ limit ²éѯ·½Ê½
²»ÖªÎªºÎ£¬MSSQL ÖÐûÓÐ limit Õâ¸ö¼«ÎªÖØÒªµÄ²éѯ·½Ê½£¬ÊìϤ MySQL µÄÅóÓѶ¼ÖªµÀ£¬MySQL µÄ limit ¶ÔÓÚʵÏÖ·ÖÒ³ºÍһЩÏÞÖƽá¹û¼¯µÄÓ¦ÓÃÖзdz£·½±ã¡£Ã»Óв»Òª½ô£¬ÎÒÃÇ¿ÉÒÔÓÃÆäËû·½·¨´ïµ½Í¬ÑùµÄÄ¿µÄ£¬×Ô¼º¶¯ÊÖ£¬·áÒÂ×ãʳ£¡
Óï·¨£º
Code:
SELECT * from
(
    ......

[ORACLE]ORACLE ʵÏÖmysqlÖеÄlimit ¹¦ÄÜ

ÏîÄ¿´ÓmysqlǨÒƵ½ORACLEÖÐÓöµ½ÒÆÖ²ÎÊÌ⣬mysqlÖÐÖ§³Ölimit ¶øORACLE say no .
½â¾ö·½·¨ ÀûÓÃORACLEµÄαÁÐ rownumÀ´¿ØÖÆ¡£¡£
Mysql : select * from table limit 10
equl
ORACLE£º select * from table where rownum <= 10
ORACLE αÁнéÉÜ£º
ËæÊý¾Ý×ÖµäÒ»Æð×Ô¶¯´´½¨µÄÒ»¸ö±í,ÊôÓÚsysģʽ,ÈκÎÓû§¶¼¿ÉÒÔ·ÃÎÊ,&nbs ......

MySql´´½¨º¯Êý

Ê×ÏÈÐèÒª²é¿´Ò»Ï´´½¨º¯ÊýµÄ¹¦ÄÜÊÇ·ñ¿ªÆô£º
X:\proper\mysql\bin>mysql -h localhost -u root -p
Enter password: **********
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 12 to server version: 5.0.22-community-nt-log
Type 'help;' or '\h' for help. Type ' ......

ÐÞ¸ÄMySQLÊý¾Ý¿âµÇ½ÃÜÂëµÄ·½·¨

   MySQLĬÈÏûÓÐÃÜÂ룬°²×°Íê±ÏÔö¼ÓÃÜÂëµÄÖØÒªÐÔÊDz»ÑÔ¶øÓ÷µÄ¡£
£¨1£©ÃüÁî
       /usr/bin/mysqladmin -u root –p ‘old-password’ password 'new-password'
       ¸ñʽ£ºmysqladmin -uÓû§Ãû -p¾ÉÃÜÂë password ÐÂÃÜÂë
£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ