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

MySQLÊý¾Ý¿âÖеÄShowÃüÁî¾ßÌåÓ÷¨

 MySQLÖÐÓкܶàµÄ»ù±¾ÃüÁshowÃüÁîÒ²ÊÇÆäÖÐÖ®Ò»£¬ÔںܶàʹÓÃÕßÖжÔshowÃüÁîµÄʹÓû¹ÈÝÒײúÉú»ìÏý£¬±¾ÎĻ㼯ÁËshowÃüÁîµÄÖÚ¶àÓ÷¨¡£
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; -- Ö»ÏÔʾ×îºóÒ»¸öÖ´ÐÐÓï¾äËù²úÉúµÄ´íÎó¡£
r. show [storage] engines; --ÏÔʾ°²×°ºóµÄ¿ÉÓô洢ÒýÇæºÍĬÈÏÒýÇæ¡£


Ïà¹ØÎĵµ£º

hibernate mysqlÓ³ÉäÀàÐÍ

 
integer »òÕß int
int »òÕß java.lang.Integer
INTEGER
4 ×Ö½Ú
long
long  Long
BIGINT
8 ×Ö½Ú
short
short  Short
SMALLINT
2 ×Ö½Ú
byte
byte  Byte
TINYINT
1 ×Ö½Ú
float
float  Float
FLOAT
4 ×Ö½Ú
double
double  Double
DOUBLE
8 ×Ö½Ú
b ......

¸ù¾Ý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Óû§ÉèÖà ......

mysqlÖÐÎÄÂÒÂëÎÊÌâ½â¾ö·½°¸

    ÔÚ֮ǰµÄÎÄÕÂÀÎÒÒѾ­Ìá¹ýÈçºÎ½â¾öJSPÖÐÂÒÂëÎÊÌ⣨½â¾ötomcatÏÂÖÐÎÄÂÒÂëÎÊÌâ £©£¬ÆäÖÐÒ²Ïêϸ½â˵ÁËMYSQLÂÒÂëÎÊÌ⣬ÏàÐÅͨ¹ýÀïÃæµÄ°ì·¨£¬¿Ï¶¨¶¼ÒѾ­½â¾öÁËJSPÀïµÄÂÒÂëÎÊÌ⣬²»¹ý»¹ÊÇÓÐЩÈ˵ÄMYSQLÂÒÂëÎÊÌâûÓеõ½½â¾ö£¬°üÀ¨ÎÒ×Ô¼º£¬ËùÒÔÓÖÕÒÁËһЩ×ÊÁÏ£¬Ï£ÍûÕâ´ÎÄÜÍêÈ«½â¾öMYSQLÊý¾Ý¿âµÄÂÒÂëÎÊÌâ¡£
......

MySQLÖÐʹÓô洢¹ý³Ì(ÕûÀí)

 MySQLÖÐʹÓô洢¹ý³Ì
ʹÓÃCallableStatementsÖ´Ðд洢¹ý³Ì
mysql°æ±¾:5.0
Connector/JµÄ°æ±¾:3.1.1ÒÔÉÏ(java.sql.CallableStatement½Ó¿ÚÒÑÍêȫʵÏÖ,³ýÁËgetParameterMetaData()·½·¨)
MySQLµÄ´æ´¢¹ý³ÌÓï·¨ÔÚMySQL²Î¿¼ÊÖ²áµÄ"´æ´¢¹ý³ÌºÍº¯Êý"Ò»ÕÂ.
http://www.mysql.com/doc/en/Stored_Procedures.html
ÏÂÃæÊÇÒ»¸ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ