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

mysql ÖÐshow ÃüÁîÓ÷¨Ïêϸ½éÉÜ

 ÒÔÏÂËùÓÐÃüÁÊÇÔÚ½øÈëmysql¼à¿ØÆ÷ÖÐÖ´Ðеģº
  a. show tables»òshow tables from database_name; // ÏÔʾµ±Ç°Êý¾Ý¿âÖÐËùÓбíµÄÃû³Æ
  b. show databases; // ÏÔʾmysqlÖÐËùÓÐÊý¾Ý¿âµÄÃû³Æ
  c. show columns from table_name from database_name; »òshow columns from database_name.table_name;  // ÏÔʾ±íÖÐÁÐÃû³Æ
  d. show grants for user_name;  //  ÏÔʾһ¸öÓû§µÄȨÏÞ£¬ÏÔʾ½á¹ûÀàËÆÓÚgrant ÃüÁî
  e. show index from table_name;  // ÏÔʾ±íµÄË÷Òý
  f. show status;  // ÏÔʾһЩϵͳÌض¨×ÊÔ´µÄÐÅÏ¢£¬ÀýÈ磬ÕýÔÚÔËÐеÄÏß³ÌÊýÁ¿
  g. show variables; // ÏÔʾϵͳ±äÁ¿µÄÃû³ÆºÍÖµ
  
  h. show  processlist; // ÏÔʾϵͳÖÐÕýÔÚÔËÐеÄËùÓнø³Ì£¬Ò²¾ÍÊǵ±Ç°ÕýÔÚÖ´ÐеIJéѯ¡£´ó¶àÊýÓû§¿ÉÒԲ鿴
                                 ËûÃÇ×Ô¼ºµÄ½ø³Ì£¬µ«ÊÇÈç¹ûËûÃÇÓµÓÐprocessȨÏÞ£¬¾Í¿ÉÒԲ鿴ËùÓÐÈ˵Ľø³Ì£¬°üÀ¨ÃÜÂë¡£
  i. show table status; // ÏÔʾµ±Ç°Ê¹ÓûòÕßÖ¸¶¨µÄdatabaseÖеÄÿ¸ö±íµÄÐÅÏ¢¡£ÐÅÏ¢°üÀ¨±íÀàÐͺͱíµÄ×îиüÐÂʱ¼ä
  j. show privileges;  // ÏÔʾ·þÎñÆ÷ËùÖ§³ÖµÄ²»Í¬È¨ÏÞ
  k. show create database database_name; // ÏÔʾcreate database Óï¾äÊÇ·ñÄܹ»´´½¨Ö¸¶¨µÄÊý¾Ý¿â
  l. show create table table_name; // ÏÔʾcreate database Óï¾äÊÇ·ñÄܹ»´´½¨Ö¸¶¨µÄÊý¾Ý¿â
  m. show engies;  // ÏÔʾ°²×°ÒÔºó¿ÉÓõĴ洢ÒýÇæºÍĬÈÏÒýÇæ¡£
  n. show innodb status; // ÏÔʾinnoDB´æ´¢ÒýÇæµÄ״̬
  o. show logs; // ÏÔʾBDB´æ´¢ÒýÇæµÄÈÕÖ¾
  p. show warnings; // ÏÔʾ×îºóÒ»¸öÖ´ÐеÄÓï¾äËù²úÉúµÄ´íÎó¡¢¾¯¸æºÍ֪ͨ
  q. show errors; // Ö»ÏÔʾ×îºóÒ»¸öÖ´ÐÐÓï¾äËù²úÉúµÄ´íÎó


Ïà¹ØÎĵµ£º

MySQL Migration ToolkitµÄʹÓÃ

 MySQL Migration ToolkitÊÇMySQL³öµÄÊý¾ÝǨÒƹ¤¾ß(ÊÊÓÃÓÚMySQL5.0»òÒÔÉÏ)£¬Ê¹Óò¢²»¸´ÔÓ£¬Ö§³ÖOracle,Microsoft SQL Server,Microsoft Access,Sybase,MaxDBµ½MySQLÖ®¼äµÄת»»¡£ÒÔÏÂʵÀýÊÇOracleµ½MySQLµÄ¡£
1. °²×°jdk1.6
×°ÍêMySQL Migration Toolkit»¹Ðè°²×°jdk1.6£¬ÐèÒªjre1.5.0.8ÒÔÉϵÄÖ§³Ö¡£
2. ÔËÐÐMySQL Mi ......

MySql»ù´¡ÖªÊ¶(¾­µä°æ)

 
Ò»¡¢mysql µÄ¹ÜÀí
1
¡¢Á¬½Ó
Mysql
¸ñʽ£º mysql -hÖ÷»úµØÖ· -uÓû§Ãû £­pÓû§ÃÜÂë
Àý1£ºÁ¬½Óµ½±¾»úÉϵÄMYSQL¡£
Ê×ÏÈÔÚ´ò¿ªDOS´°¿Ú£¬È»ºó½øÈëĿ¼ mysqlbin£¬ÔÙ¼üÈëÃüÁîmysql -uroot -p£¬»Ø³µºóÌáʾÄãÊäÃÜÂ룬Èç¹û¸Õ°²×°ºÃMYSQL£¬³¬¼¶Óû§rootÊÇûÓÐÃÜÂëµÄ£¬¹ÊÖ±½Ó»Ø³µ¼´¿É½øÈëµ½MYSQLÖÐÁË£¬MYSQLµÄÌáʾ·ûÊÇ£º ......

mysql alter Óï¾äÓ÷¨,Ìí¼Ó¡¢Ð޸ġ¢É¾³ý×Ö¶Î

//Ö÷¼ü
alter table tabelname add new_field_id int(5) unsigned default 0 not null auto_increment ,add primary key (new_field_id);
//Ôö¼ÓÒ»¸öÐÂÁÐ
alter table t2 add d timestamp;
alter table infos add ex tinyint not null default '0';
//ɾ³ýÁÐ
alter table t2 drop column c;
//ÖØÃüÃûÁÐ
......

¼ÌÐøÕª³­£º½ÌÄãÓÃPHPдMySQLÊý¾Ý¿âµÄÓû§ÈÏ֤ϵͳ

Óû§ÈÏÖ¤µÄÔ­ÀíºÜ¼òµ¥£ºÊ×ÏÈÐèÒªÓû§ÔÚÒ³ÃæÉÏÌîÈëÓû§ÃûºÍÃÜÂ룬µ±È»Ã»×¢²áµÄÓû§ÐèÒªÏÈ×¢²á¡£È»ºóµ÷ÓÃÊý¾Ý¿âËÑË÷ÊÇ·ñÓÐÏàÓ¦µÄÓû§¡£Èç¹ûÓоÍÈ·ÈÏ£¬Ã»ÓÐÔòÌáÐÑÓû§ÏÈ×¢²á¡£Ê¹ÓÃPHPÀ´Íê³ÉÕâÒ»Çкܼòµ¥£¬µ«ÐèҪעÒâµÄÊÇÈç¹ûÏëÔÚÒÔºóµÄÒ³ÃæÖж¼ÄÜÈ·ÈÏÓû§Éí·Ý¡£
µÚÒ»²½ÊÇ×öÒ»¸öµÇ¼µÄÒ³Ãæ¡£
µÚ¶þ²½¿ªÊ¼µÇ¼ºóµÄÈ·ÈϳÌÐòµÄÉ ......

½«Ô¶³ÌÊý¾Ý¿âµ¹µ½±¾µØµÄ·½·¨£¨MySql£©

Dos½øÈëMySqlµÄbinĿ¼,Ö´ÐУºmysqldump -hÔ¶³ÌÊý¾Ý¿âIP Êý¾Ý¿âÃû×Ö -uÔ¶³ÌÊý¾Ý¿âÓû§Ãû -pÔ¶³ÌÊý¾Ý¿âÃÜÂë --add-drop-table | mysql ±¾µØÊý¾Ý¿âÃû×Ö -u±¾µØÊý¾Ý¿âÓû§Ãû -p±¾µØÊý¾Ý¿âÃÜÂë
ÔÚ¾ÖÓòÍøÄÚ²âÊԳɹ¦ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ