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

MySQL grant Óï·¨µÄÏêϸ½âÎö

ÒÔϵÄÎÄÕÂÊÇMySQL grantÓï·¨µÄÏêϸ½âÎö£¬Èç¹ûÄã¶ÔMySQL grantÓï·¨µÄÏà¹ØµÄʵ¼Ê²Ù×÷ÓÐÐËȤµÄ»°£¬Äã¾Í¿ÉÒÔ¶ÔÒÔϵÄÎÄÕµã»÷¹Û¿´ÁË¡£ÎÒÃÇ´ó¼Ò¶¼ÖªµÀ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
grant ²Ù×÷ MySQL Ë÷ÒýȨÏÞ¡£
grant index on testdb.* to
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.%';
grant alter routine on testdb.* to developer@'192.168.0.%';
grant execute on testdb.* to developer@'192.168.0.%';
Èý¡¢grant ÆÕͨ DBA ¹ÜÀíij¸ö MySQL Êý¾Ý¿âµÄȨÏÞ¡£
grant all privileges on testdb to
ÆäÖУ¬¹Ø¼ü×Ö “privileges” ¿ÉÒÔÊ¡ÂÔ¡£
grant execute on procedure testdb.pr_add to 'dba'@'localhost';
grant execute on function testdb.fn_add to 'dba'@'localhost';
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 ÖеÄËùÓÐÊ


Ïà¹ØÎĵµ£º

¹ØÓÚMySQLµÄJDBCÇý¶¯µÄÎÊÌâ

°²×°JDBCÇý¶¯£º
½âѹËõmysql-connector-java-3.1.10.zip
½«ÒªÊ¹ÓõÄÊÇmysql-connector-java-3.1.10-bin-g.jarºÍmysql-connector-java-3.1.10-bin.jar
ÅäÖÃ
ÔÚC:\Program Files\JavaĿ¼Ï½¨Á¢mysqlforjdbc×ÓĿ¼£¬½øÈë¸ÃĿ¼½«mysql-connector-java-3.1.10-bin.jarµ½¸ÃĿ¼ÏÂ
½øÈëC:\Program Files\Java\jdk1.5.0_04\l ......

MySQL³£ÓÃÃüÁî

µÚÒ»ÕС¢mysql·þÎñµÄÆô¶¯ºÍÍ£Ö¹
net stop mysql
net start mysql
µÚ¶þÕС¢µÇ½mysql
Óï·¨ÈçÏ£º mysql -uÓû§Ãû -pÓû§ÃÜÂë
¼üÈëÃüÁîmysql -uroot -p£¬ »Ø³µºóÌáʾÄãÊäÈëÃÜÂ룬ÊäÈë12345£¬È»ºó»Ø³µ¼´¿É½øÈëµ½mysqlÖÐÁË£¬mysqlµÄÌáʾ·ûÊÇ£º
mysql>
×¢Ò⣬Èç¹ûÊÇÁ¬½Óµ½ÁíÍâµÄ»úÆ÷ÉÏ£¬ÔòÐèÒª¼ÓÈëÒ»¸ö²ÎÊý-h»úÆ÷IP
µ ......

MysqlµÄÔ¶³ÌµÇ¼


ysqlĬÈÏÊDz»ÔÊÐíÔ¶³ÌÁ¬½ÓµÄ£¬ÒòΪÓкܴóµÄ°²È«Òþ»¼¡£
¡¡¡¡ÐèÒªÊÖ¶¯Ôö¼Ó¿ÉÒÔÔ¶³Ì·ÃÎÊÊý¾Ý¿âµÄÓû§¡£
¡¡¡¡·½·¨Ò»¡¢±¾µØµÇÈëmysql£¬¸ü¸Ä "mysql" Êý¾Ý¿âÀïµÄ "user" ±íÀïµÄ "host" Ï½«"localhost"¸ÄΪ"%"
#mysql -u root -proot
mysql>use mysql;
mysql>update user set host = '%' where user = 'root';
my ......

mysql ʱ¼ä¶Î²éѯ

24СʱÄڼǼ£¨¼´86400Ã룩
$sql="SELECT video_id,count(id)as n from `rec_down` WHERE UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(add_time)<=86400 group by video_id order by n desc ";
$sql="select a.id,a.title,b.n from video_info a,(".$sql.")b where a.id=b.video_id order by n desc limit 20";
NÌìÄڼǼ ......

MySQL Á·Ï°ÊÖ¸å

MySQL Á·Ï°ÊÖ¸å
      MySQL ½éÉÜ
      MySQL ABÊÇÓÉMySQL´´Ê¼È˺ÍÖ÷Òª¿ª·¢ÈË´´°ìµÄ¹«Ë¾¡£MySQL AB×î³õÊÇÓÉDavid Axmark¡¢Allan
LarssonºÍMichael“Monty
”WideniusÔÚÈðµä´´°ìµÄ¡£
      ¹«Ë¾ÃûÖеēAB”ÊÇÈðµäÓ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ