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

MySQL£ºGrant Óï·¨Ïê½â£¨MySQL 5.X£©


±¾ÎÄʵÀý£¬ÔËÐÐÓÚ MySQL 5.0 ¼°ÒÔÉÏ°æ±¾¡£
MySQL ¸³ÓèÓû§È¨ÏÞÃüÁîµÄ¼òµ¥¸ñʽ¿É¸ÅÀ¨Îª£º
grant ȨÏÞ on Êý¾Ý¿â¶ÔÏó to Óû§
Ò»¡¢grant ÆÕͨÊý¾ÝÓû§£¬²éѯ¡¢²åÈë¡¢¸üС¢É¾³ý Êý¾Ý¿âÖÐËùÓбíÊý¾ÝµÄȨÀû¡£
grant select on testdb.* to common_user@'%'
grant insert on testdb.* to common_user@'%'
grant update on testdb.* to common_user@'%'
grant delete on testdb.* to common_user@'%'
»òÕߣ¬ÓÃÒ»Ìõ MySQL ÃüÁîÀ´Ìæ´ú£º
grant select, insert, update, delete on testdb.* to common_user@'%'
¶þ¡¢grant Êý¾Ý¿â¿ª·¢ÈËÔ±£¬´´½¨±í¡¢Ë÷Òý¡¢ÊÓͼ¡¢´æ´¢¹ý³Ì¡¢º¯Êý¡£¡£¡£µÈȨÏÞ¡£
grant ´´½¨¡¢Ð޸ġ¢É¾³ý MySQL Êý¾Ý±í½á¹¹È¨ÏÞ¡£
grant create on testdb.* to developer@'192.168.0.%';
grant alter on testdb.* to developer@'192.168.0.%';
grant drop on testdb.* to developer@'192.168.0.%';
grant ²Ù×÷ MySQL Íâ¼üȨÏÞ¡£
grant references on testdb.* to developer@'192.168.0.%';
grant ²Ù×÷ MySQL ÁÙʱ±íȨÏÞ¡£
grant create temporary tables on testdb.* to developer@'192.168.0.%';
grant ²Ù×÷ MySQL Ë÷ÒýȨÏÞ¡£
grant index on testdb.* to developer@'192.168.0.%';
grant ²Ù×÷ MySQL ÊÓͼ¡¢²é¿´ÊÓͼԴ´úÂë ȨÏÞ¡£
grant create view on testdb.* to developer@'192.168.0.%';
grant show view on testdb.* to developer@'192.168.0.%';
grant ²Ù×÷ MySQL ´æ´¢¹ý³Ì¡¢º¯Êý ȨÏÞ¡£
grant create routine on testdb.* to developer@'192.168.0.%'; -- now, can show procedure status
grant alter routine on testdb.* to developer@'192.168.0.%'; -- now, you can drop a procedure
grant execute on testdb.* to developer@'192.168.0.%';
Èý¡¢grant ÆÕͨ DBA ¹ÜÀíij¸ö MySQL Êý¾Ý¿âµÄȨÏÞ¡£
grant all privileges on testdb to dba@'localhost'
ÆäÖУ¬¹Ø¼ü×Ö “privileges” ¿ÉÒÔÊ¡ÂÔ¡£
ËÄ¡¢grant ¸ß¼¶ DBA ¹ÜÀí MySQL ÖÐËùÓÐÊý¾Ý¿âµÄȨÏÞ¡£
grant all on *.* to dba@'localhost'
Îå¡¢MySQL grant ȨÏÞ£¬·Ö±ð¿ÉÒÔ×÷ÓÃÔÚ¶à¸ö²ã´ÎÉÏ¡£
1. grant ×÷ÓÃÔÚÕû¸ö MySQL ·þÎñÆ÷ÉÏ£º
grant select on *.* to dba@localhost; -- dba ¿ÉÒÔ²éѯ MySQL ÖÐËùÓÐÊý¾Ý¿âÖÐµÄ±í¡£
grant all on *.* to dba@localhost; -- dba ¿ÉÒÔ¹ÜÀí MySQL ÖеÄËùÓÐÊý¾Ý¿â
2. grant ×÷ÓÃÔÚµ¥¸öÊ


Ïà¹ØÎĵµ£º

MySQL×Ö·û´®º¯ÊýµÄÓ¦ÓÃÓë×¢ÒâÊÂÏî

MySQL×Ö·û´®º¯ÊýµÄÓ¦ÓÃÓë×¢ÒâÊÂÏî
 
ÒÔϵÄÎÄÕÂÖ÷ÒªÏò´ó¼ÒÃèÊöµÄÊÇMySQL×Ö·û´®º¯ÊýµÄʵ¼ÊÓ¦ÓÃÓëÆäʵ¼Ê²Ù×÷´úÂëµÄÃèÊö£¬Í¬Ê±±¾ÎÄ»¹¶ÔÆäÔÚʵ¼ÊÓ¦ÓÃÖУ¬Ò»Ð©ÖµµÃÎÒÃÇ´ó¼Ò×¢ÒâµÄÏà¹ØÊÂÏîµÄÃèÊö£¬ÒÔϾÍÊÇÎÄÕµÄÖ÷ÒªÄÚÈÝÃèÊö£¬ÍûÄã»áÓÐËùÊÕ»ñ¡£
 
CHARSET(str)  ·µ»Ø×Ö´®×Ö·û¼¯
 
CONCAT (string2 [,& ......

½â¾öÖÐÎÄ´æÈëMySql³öÏÖÂÒÂëÎÊÌâ

½â¾ö°ì·¨£ºÔÚÁ¬½Ó×Ö·û´®ÖÐ˵Ã÷Á¬½Ó×Ö·ûµÄÊôÐÔ£¬È磺
    <add name="server_mysql" connectionString="server=127.0.0.1;user id=root; password=123; database=baiduemail; pooling=false;charset=gbk"/>
»òÕßÊÇ;charset=gb2312
ÁíÍâ×¢Ò⣺ÔÚ´´½¨mysqlÊý¾Ý¿âµÄ±íµÄʱºòÑ¡Ôñ±àÂ뼯gbk ......

apache tomcat mysql ¸ºÔØƽºâºÍ¼¯Èº¼¼Êõ

¹«Ë¾¿ª·¢ÁËÒ»¸öÍøÕ¾£¬¹À¼Æ×î¸ßÔÚÏßÈËÊýÊÇ3 Íò£¬²¢·¢ÈËÊý×î¶à100 ÈË¡£¿ª·¢µÄÍøÕ¾ÊÇ·ñÄÜ·ñ³ÐÊÜÕâ¸öѹÁ¦£¬ÈçºÎÈ·±£ÍøÕ¾µÄ¸ººÉûÓÐÎÊÌ⣬¾­¹ýÑо¿¾ö¶¨ÈçÏ£º
£¨1 £©²ÉÓøºÔØƽºâºÍ¼¯Èº¼¼Êõ£¬³õ²½»ú¹¹²ÉÓÃApache Tomcat µÄ»úȺ¼¼Êõ¡£
£¨2 £©²ÉÓÃѹÁ¦²âÊÔ¹¤¾ß£¬²âÊÔѹÁ¦¡£¹¤¾ßÊÇLoadrunner.
Ó²¼þ»·¾³´î½¨£º
ΪÁËÄܹ»½øÐÐѹÁ¦² ......

mysql С¼¼ÇÉ£¬×Ö·û¼¯£¬»·¾³±äÁ¿

Ò»¡¢MySql£¬ÓÃcmdÃüÁîÌáʾÐÐÁ¬½ÓÊý¾Ý¿â£¬·¢ÏÖ²éѯÊý¾Ý¿âÖеÄÖÐÎijöÏÖÂÒÂ룬¶øÊý¾Ý¿âÀïÃæ´æµÄÊÇutf8£¬¶¼ÊÇÕýÈ·µÄ
ÓÚÊÇÉÏÍøËÑË÷һϣ¬
ÕÒµ½Ïà¹ØÉèÖ÷½·¨ÈçÏ¡£
1¡¢MySQLÊÇÓÐһЩ»·¾³±äÁ¿¿ÉÒÔÉèÖã¬
¿ÉÊäÈ룺show variables;¿É²é¿´µ±Ç°µÄ»·¾³±äÁ¿ÉèÖã»
2¡¢ÕâЩ±äÁ¿µ±ÖÐÓÐÒ»²¿·ÖÓë×Ö·ûÏà¹ØµÄÉèÖã¬
¿ÉÊäÈ룺show variabl ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ