mysql ´´½¨Óû§·½·¨
ÃüÁʽµÄ.×¢ÒâÿÐкó±ß¶¼¸ú¸ö £» ±íʾһ¸öÃüÁîÓï¾ä½áÊø.
¸ñʽ£ºgrant select on Êý¾Ý¿â.* to
Óû§Ãû@µÇ¼Ö÷»ú identified by "ÃÜÂë"
Àý1¡¢Ôö¼ÓÒ»¸öÓû§test1ÃÜÂëΪabc£¬ÈÃËû¿ÉÒÔÔÚÈκÎÖ÷»úÉϵǼ£¬²¢¶ÔËùÓÐÊý¾Ý¿âÓвéѯ¡¢²åÈë¡¢Ð޸ġ¢É¾³ýµÄȨÏÞ¡£Ê×ÏÈÓÃÒÔ
rootÓû§Á¬ÈëMYSQL
£¬
È»ºó¼üÈëÒÔÏÂÃüÁ
grant select,insert,update,delete on *.* to test1@"%"
Identified by "abc";
µ«Àý1Ôö¼ÓµÄÓû§ÊÇÊ®·ÖΣÏյģ¬ÄãÏëÈçij¸öÈËÖªµÀtest1µÄÃÜÂ룬ÄÇôËû¾Í¿ÉÒÔÔÚinternetÉϵÄÈκÎһ̨µçÄÔÉϵǼÄãµÄmysql
Êý¾Ý¿â
²¢¶ÔÄãµÄÊý¾Ý¿ÉÒÔΪËùÓûΪÁË£¬½â¾ö°ì·¨¼ûÀý2¡£
Àý2¡¢Ôö¼ÓÒ»¸öÓû§test2ÃÜÂëΪabc,ÈÃËûÖ»¿ÉÒÔÔÚlocalhostÉϵǼ£¬²¢¿ÉÒÔ¶ÔÊý¾Ý¿âmydb½øÐвéѯ¡¢²åÈë¡¢Ð޸ġ¢É¾
³ýµÄ²Ù×÷£¨localhostÖ¸±¾µØÖ÷»ú£¬¼´MYSQL
Êý¾Ý¿âËùÔÚµÄÄÇ̨Ö÷»ú£©£¬ÕâÑùÓû§¼´Ê¹ÓÃÖªµÀtest2µÄÃÜÂ룬ËûÒ²ÎÞ·¨´ÓinternetÉÏÖ±½Ó·ÃÎÊÊý¾Ý
¿â£¬Ö»ÄÜͨ¹ýMYSQL
Ö÷
»úÉϵÄwebÒ³À´·ÃÎÊÁË¡£
grant select,insert,update,delete on mydb.* to test2@localhost
identified by "abc";
Èç¹ûÄã²»Ïëtest2ÓÐÃÜÂ룬¿ÉÒÔÔÙ´òÒ»¸öÃüÁÃÜÂëÏûµô¡£
grant
select,insert,update,delete on mydb.* to test2@localhost identified by
"";
Ïà¹ØÎĵµ£º
¿ÉÒԲο¼ÏÂÁÐÎÄÕÂ
http://www.mysqlperformanceblog.com/2010/03/23/too-many-connections-no-problem/
½áÂÛÈçÏ£º
£¨1£©mysqlĬÈÏ»á¸øsuperÓû§ÁôÒ»¸öÁ¬½Ó£¬Äã¿ÉÒÔÓÃÕâ¸öÔ¤ÁôµÄÁ¬½ÓÀ´µÇ¼£¬À´Ôö¼ÓÁ¬½ÓÊý£»µ«ÊÇÈç¹ûÁ¬½ÓµÄÓû§È«ÊÇsuperȨÏ޵ģ¬ÔòÕâ¸öÔ¤ÁôµÄÁ¬½Ó²»´æÔÚ¡£Õâʱ¿ÉÒÔÓÃÒÔϵÄÃüÁîÀ´ÉèÖÃÁ¬½ÓÊý£ºgdb -p $(cat ......
1.±³¾°
֮ǰ´ÓûÓùýhibernate£¬Òò´ËÔÚÍøÉÏËÑÁËÒ»ÏÂhibernate¿ìËÙÈëÃÅ·½ÃæµÄÐÅÏ¢£¬×îºóÎÒ°´ÕÕ¡¶Myeclipse Hibernate ¿ìËÙÈëÃÅ ÖÐÎÄ°æ¡·£¨CSDN£¬°Ù¶ÈÎĿⶼÓУ©Ò»ÎÄ¿ªÊ¼ÁËÎÒµÄhibernateÖ®Âã¨ÎªÏîÄ¿×ö¼¼Êõ×¼±¸£©¡£
ÏÂÃ ......
ÕâÁ½ÌìÕýÔÚ²âMYSQLµÄÐÔÄÜ£¬°´ÕÕMYSQLÎĵµÖÐÍƼöµÄÉèÖã¬ÐÞ¸ÄÁ˼¸¸öϵͳ±äÁ¿
innodb_buffer_pool_size=1G
innodb_log_file_size=250M
innodb_log_buffer_size=8M
½á¹ûMYSQL±ÀÁË¡£mysql¿Í»§¶ËÄܵǼ£¬µ«Ö»ÒªÖ´ÐÐÈκÎÃüÁmysqldÁ¢¿Ì±Àµô¡£
¿ªÊ¼»¹ÒÔΪÊÇinnodb_buffer_pool_sizeµÈ¼¸¸ö²ÎÊýÉèµÃÌ«´óÁË£¬¿ÉÊǵ÷ÕûÁ˼¸´Î¶ ......
ÔÚÉú²úÓ¦ÓÃÖУ¬Ä³Ì¨“Nginx+PHP+MySQL”½Ó¿ÚÊý¾Ý·þÎñÆ÷£¬°çÑݵĽÇÉ«Ê®·ÖÖØÒª£¬Èç¹û·þÎñÆ÷Ó²¼þ»òNginx¡¢MySQL·¢Éú¹ÊÕÏ£¬¶ø ¶Ìʱ¼äÄÚÎÞ·¨»Ö¸´£¬ºó¹û½«·Ç³£ÑÏÖØ¡£ÎªÁ˱ÜÃâµ¥µã¹ÊÕÏ£¬ÎÒÉè¼ÆÁË´ËÌ×·½°¸£¬±àдÁËfailover.sh½Å±¾£¬ÊµÏÖÁËË«»ú»¥±¸¡¢È«×Ô¶¯Çл»£¬¹ÊÕÏתÒÆʱ¼ä Ö»Ð輸ʮÃë¡£
Ò»¡¢Ë«»ú»¥±¸¡¢È«×Ô¶¯Çл»·½°¸ ......