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

MysqlÓû§Ìí¼Ó¼°È¨ÏÞ·ÖÅä

     ¸ñʽ£ºgrant [PRIVILEGES]  on [databaseName.tableName] to [userName]@[host] identified by [password] with grant option;
     eg1:  grant select on mysql.user to wqh@localhost
     eg2:GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON expenses.* TO custom@whitehouse.gov IDENTIFIED BY 'stupid';


Ïà¹ØÎĵµ£º

MYSQLºÍjavaÖеÄÊýÖµ·¶Î§ 91KGE

mysqlÊýÖµ·¶Î§
tinyint  -128~127   0~255
smallint  -32768~32767  0~65535
mediumint -8388608~8388607  0~16777215
int -2147483648~2147483647 0~4294967295
bigint  -9223372036854775808~9223372036854775807   0~18446744073709551615
javaÖÐ
byte   ......

²éѯmysqlÊý¾Ý¿âµÄ´óС

£¨1£©INFORMATION_SCHEMA
select (sum(data_length) + sum(index_length))/(1024*1024) from INFORMATION_SCHEMA.`TABLES` where table_schema =  'your_table_schema' and table_name like 'your_table_name';
£¨2£©show table status like '';
try {
Class.forName("com.mysql.jdbc.Driver");
......

С̸MySQL×Ö·û¼¯


×÷/ÒëÕߣºÒ¶½ðÈÙ£¨Email: £©£¬À´Ô´£ºhttp://imysql.cn£¬×ªÔØÇë×¢Ã÷×÷/ÒëÕߺͳö´¦£¬²¢ÇÒ²»ÄÜÓÃÓÚÉÌÒµÓÃ;£¬Î¥Õ߱ؾ¿¡£
Ê×ÏÈ,ÕâƬÎÄÕ´¿´âÊÇÎҵĸöÈ˾­Ñé̸֮,ÊÊÓÃÓÚÎÒ³£¼ûµÄ»·¾³¼°ÏîÄ¿ÖÐ.
¸öÈ˽¨Òé,Êý¾Ý¿â×Ö·û¼¯¾¡Á¿Ê¹ÓÃutf8(HTMLÒ³Ãæ¶ÔÓ¦µÄÊÇutf-8),ÒÔʹÄãµÄÊý¾ÝÄܺÜ˳ÀûµÄʵÏÖǨÒÆ,ÒòΪutf8×Ö·û¼¯ÊÇÄ¿Ç°×îÊʺÏÓÚÊ ......

mysqlÃüÁîÐв»Ö´ÐкÍÃüÁîÐÐÖÐÎÄÂÒÂëµÄ½â¾ö


1£ºMysql ÃüÁî²»¿ÉÒÔÖ´ÐÐ
Ô­Òò £ººÇºÇ ±ÈÈç show databases µÄÃüÁî £¬Ö´ÐÐÍêÖ®ºó ɶҲûÓÐ £¬×Ðϸ ÕÒÁËÔ­Òò £¬Oh my god  ÉÙÁË ·ÖºÅ¡£
Ӧд³É£ºshow databases;
2£ºÃüÁîÐÐÖÐÎÄÂÒÂëÎÊÌâ
ÏÖÏó£ºmysqlµÄĬÈϱàÂëÉèÖÃΪutf-8£¬Ò³ÃæÒÔutf-8µÄ±àÂ뷽ʽдÈëµ½Êý¾Ý¿â¡£Óù¤¾ß²é¿´Ò»ÇÐÕý³££¬µ«´ÓmysqlµÄÃüÁîÐжÁÊý¾Ý³öÀ´× ......

MySQL ÊÂÎñ ´æ´¢¹ý³Ì ʵÀý

USE dxdb;
DELIMITER //
#»ñÈ¡Á÷Ë®ºÅ
DROP PROCEDURE IF EXISTS get_sid;
CREATE PROCEDURE get_sid(para_domain VARCHAR(20), out para_sid BIGINT UNSIGNED)
BEGIN
START TRANSACTION;
UPDATE t_sid SET sID=sID+1 WHERE cDomain=para_domain;
SELECT sID INTO para_sid from t_sid WHERE cDomain=para_domain;
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ