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

MYSQL »ù±¾ÃüÁî

½øÈëMySQL:mysql -u root -p password;
Í˳öMySQL:quit/exit;
´´½¨Êý¾Ý¿â£ºcreate database database-name;
ÏÔʾËùÓеÄÊý¾Ý¿â: show databases; ×¢ÒâÓиös;
ɾ³ýÊý¾Ý¿â£ºdrop database databasename;
lÁ¬½ÓÊý¾Ý¿â£ºuse databasename;Ìáʾ£ºdatabase changed;
Ñ¡Ôñµ±Ç°Êý¾Ý¿â£ºselect database();
µ±Ç°Êý¾Ý¿âËù°üº¬µÄ±í£ºshow tables;
´´½¨Óû§²¢¸³ÓèȨÁ¦£ºgrant all privileges on dbname.* to username@localhost identified by password;
´´½¨Êý¾Ý±í£ºcreate table table-name(<×Ö¶Î1><ÀàÐÍ1>,<×Ö¶Î2><ÀàÐÍ2>, <×Ö¶Î...n><ÀàÐÍn>)£»
»ñÈ¡±í½á¹¹£ºdesc table-name/show columns from table-name;
ɾ³ý±í£ºdrop table table-name;
²åÈëÊý¾Ý£ºinsert into table-name (<×Ö¶Î1>,<×Ö¶Î2>, <×Ö¶Î...n>) values('','','');
²éѯÊý¾Ý±íÖеÄÊý¾Ý£ºselect * from table-name(²éѯȫ²¿Êý¾Ý);
²éѯǰ¼¸ÐÐÊý¾Ý£ºselect * from table-name order by id limit 0,n;
ɾ³ý±íÖеÄÊý¾Ý£ºdelete from table-name where Ìõ¼þ;
¸úбíÖеÄÊý¾Ý£ºupdate table-name set ×Ö¶Î=ÐÂÖµ,... where Ìõ¼þ£»
ÔÚ±íÖÐÌí¼Ó×ֶΣºalter table table-name add <×Ö¶Î> <lÀàÐÍ>..;
¸ü¸Ã±íÃû£º rename table oldtablename to newtablename;
¸üÐÂ×Ö¶ÎÄÚÈÝ£ºupdate table-name set ×Ö¶ÎÃû=ÐÂÄÚÈÝ£»
µ¼³öÕû¸öÊý¾Ý¿â:mysqldump -u Óû§Ãû -p Êý¾Ý¿âÃû > µ¼³öµÄÎļþÃû   
µ¼³öÒ»¸ö±í:mysqldump -u Óû§Ãû -p Êý¾Ý¿âÃû±íÃû> µ¼³öµÄÎļþÃû
µ¼³öÒ»¸öÊý¾Ý¿â½á¹¹ : mysqldump -u root -p -d --add-drop-table lcc >d:\lcc.sql-d ûÓÐÊý¾Ý --add-drop-table ÔÚÿ¸öcreateÓï¾ä֮ǰÔö¼ÓÒ»¸ödrop table
µ¼ÈëÊý¾Ý¿â
  ³£ÓÃsource ÃüÁî
  ½øÈëmysqlÊý¾Ý¿â¿ØÖÆ̨£¬
  Èçmysql -u root -p 
 mysql>use Êý¾Ý¿â
 È»ºóʹÓÃsourceÃüÁºóÃæ²ÎÊýΪ½Å±¾Îļþ£¨ÈçÕâÀïÓõ½µÄ.sql£©
 mysql>source d:\1.sql
 


Ïà¹ØÎĵµ£º

MysqlÖÐlimitµÄÓ÷¨Ïê½â


MysqlÖÐlimitµÄÓ÷¨£ºÔÚÎÒÃÇʹÓòéѯÓï¾äµÄʱºò£¬¾­³£Òª·µ»ØÇ°¼¸Ìõ»òÕßÖмäij¼¸ÐÐÊý¾Ý£¬Õâ¸öʱºòÔõô°ìÄØ£¿²»Óõ£ÐÄ£¬mysqlÒѾ­ÎªÎÒÃÇÌṩÁËÕâÑùÒ»¸ö¹¦ÄÜ¡£
SELECT * from table   LIMIT [offset,] rows | rows OFFSET offset
LIMIT ×Ó¾ä¿ÉÒÔ±»ÓÃÓÚÇ¿ÖÆ SELECT Óï¾ä·µ»ØÖ¸¶¨µÄ¼Ç¼Êý¡£LIMIT ½ÓÊÜÒ»¸ö»òÁ½¸öÊý ......

Mysql֪ʶµã×ܽ᣺Flush privileges

mysql> flush privileges;ʲôÒâ˼£¿­
mysql> update mysql.user set password=PASSWORD('ÐÂÃÜÂë') where User='root';­
mysql> flush privileges;­
mysql> quit­
´ð:­
mysql ÐÂÉèÖÃÓû§»ò¸ü¸ÄÃÜÂëºóÐèÓÃflush privilegesË¢ÐÂMySQLµÄϵͳȨÏÞÏà¹Ø±í£¬·ñÔò»á³öÏ־ܾø·ÃÎÊ£¬»¹ÓÐÒ»ÖÖ·½· ......

mysql ͼÐιÜÀí¹¤¾ß

myphpadmin¹¦ÄÜËäÈ»ÒѾ­ºÜÇ¿£¬µ«Óû§ÌåÑé·½Ãæ²¢²»ºÜºÃ¡£
SQLyog
Mysql-front
EMS MySQL Manager
Mysqlcc
Navicat for MySQL
mysql-gui-tools
MySQL ͼÐι¤¾ß½éÉÜ£¨×ªÔØ£©
1¡¢Navicat
NavicatÊÇÒ»¸öÇ¿´óµÄMySQLÊý¾Ý¿â¹ÜÀíºÍ¿ª·¢¹¤¾ß¡£Navicatµ¼º½Îª×¨Òµ¿ª·¢ÕßÌṩÁËÒ»Ì×Ç¿´óµÄ×ã¹»¼â¶ËµÄ¹¤¾ß£¬µ«Ëü¶ÔÓÚÐÂÓû§ÈÔÈ» ......

linux°²×°mysql.txt

linux°²×°mysql.txt
2009-03-22 10:45
¡¡Ò»¡¢ÒýÑÔ
¡¡¡¡ÏëʹÓÃLinuxÒѾ­ºÜ³¤Ê±¼äÁË£¬ÓÉÓÚûÓÐÓ²ÐÔÈÎÎñһֱҲûÓÐϵͳѧϰ£¬½üÈÕÓÉÓÚ¹¤×÷ÐèÒª±ØÐëʹÓÃLinuxϵÄMySQL¡£±¾ÒÔΪÓÐWindowsÏÂʹÓÃSQL ServerµÄ¾­Ñ飬¾õµÃÔÚLinuxÏ°²×°MySqlÓ¦¸ÃÊÇÒ×Èç·´ÕƵÄÊ£¬¿ÉÔÚÕæÕý°²×°ºÍʹÓÃMySQLʱ×ßÁ˺ܶàÍä·£¬Óö¼ûºÜ¶àÎÊÌ⣬±Ï¾¹Linux ......

¹ØÓÚhibernateÅäÖÃc3p0Á¬½Ó³ØÁ¬½ÓmysqlÎÊÌâ

ǰЩÌì¿´ÁËÀî¸Õ<struts2+hibernate+spring>ÄÇÊéÉϵÄhibernate£¬ÅäÖÃÎļþÒ²ÊÇ°´ÕÕÉÏÃæÇýøhibernate.cfg.xmlÎļþµÄ£¬Student.javaÅäÖõÄStudent.hbm.xmlÎļþ¾õµÃҲûʲôÎÊÌ⣬µ«²»Öªµ½Ôõô»ØʾÍÊDZ¨ connection can not open¡£ÓôÃÆ°¡£¬ºóÀ´ÎҾͰÑÊéÀïÃæµÄÅäÖÃÎļþºÍÔ´Â룬¸´ÖƵ½MyEclipseÏÂÃæµÄÒ»¸öÐÂwebÏîÄ¿ÖУ¬ÔËÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ