MYSQLÓÅ»¯ÅäÖÃ
MySQLÅäÖÃÎļþ
MySQL·¢²¼µÄ×îвúƷʵ¼ÊÉϳ¬³öÁËLinuxËùЯ´øµÄ°æ±¾¡£µ«ÊÇ£¬Îȶ¨ÐԺͿª·ÅÔ´´úÂë¿ÉÊǺÜÖØÒªµÄÒòËØ£¬Òò´ËÔÚ²Ù×÷ϵͳÉÏʹÓýÏÔçMySQL°æ±¾ÊÇÓеÀÀíµÄ¡£
ÓÐÐí¶à¿ÉÒÔ²ÉÓõÄÅäÖÃÎļþ£¬ËüÃǶ¼±»°üº¬ÔÚmysql-server PRM³ÌÐòÖС£»¹ÓÐÒ»¸öĬÈϵÄÅäÖÃÎļþ±»°üº¬ÔÚmysql PRM³ÌÐò°üÖС£
ÅäÖÃMySQL·þÎñÆ÷ÊÇÒ»¸ö·á¸»¶ø¸´ÔӵŤ×÷¡£ÔÚ±¾ÎÄÖУ¬ÎÒÖ»ÄÜ·ôdzµÄ˵һϸ÷ÖÖÑ¡Ïî¡£¿ÉÒÔʹÓõÄMySQLÅäÖÃÎļþ¹²ÓУµ¸ö¡£×îºó£´¸öλÓÚ/usr/share/mysql/Ŀ¼ÖС£
·/etc/my.cnfÊÇĬÈϵÄMySQLÅäÖÃÎļþ¡£Ó¦¸Ã¶ÔÕâ¸öÎļþÅäÖÃÐ޸ġ£ËüÊÇΪѧϰĿµÄ¶øÉè¼ÆµÄ¡£
·my-small.cnfÊÇΪÁËСÐÍÊý¾Ý¿â¶øÉè¼ÆµÄ¡£²»Ó¦¸Ã°ÑÕâ¸öÄ£ÐÍÓÃÓÚº¬ÓÐһЩ³£ÓÃÏîÄ¿µÄÊý¾Ý¿â¡£
·my-medium.cnfÊÇΪÖеȹæÄ£µÄÊý¾Ý¿â¶øÉè¼ÆµÄ¡£Èç¹ûÄãÕýÔÚÆóÒµÖÐʹÓÃRHEL,¿ÉÄÜ»á±ÈÕâ¸ö²Ù×÷ϵͳµÄ×îСRAMÐèÇó(256MB)Ã÷ÏÔ¶àµÃ¶àµÄÎïÀíÄÚ´æ¡£Óɴ˿ɼû£¬Èç¹ûÓÐÄÇô¶àRAMÄÚ´æ¿ÉÒÔʹÓã¬×ÔÈ»¿ÉÒÔÔÚͬһ̨»úÆ÷ÉÏÔËÐÐÆäËü·þÎñ¡£
·my-large.cnfÊÇΪרÓÃÓÚÒ»¸öSQLÊý¾Ý¿âµÄ¼ÆËã»ú¶øÉè¼ÆµÄ¡£ÓÉÓÚËü¿ÉÒÔΪ¸ÃÊý¾Ý¿âʹÓöà´ï512MBµÄÄڴ棬ËùÒÔÔÚÕâÖÖÀàÐ͵ÄϵͳÉϽ«ÐèÒªÖÁÉÙ1GBµÄRAM,ÒÔ±ãËüÄܹ»Í¬Ê±´¦Àí²Ù×÷ϵͳÓëÊý¾Ý¿âÓ¦ÓóÌÐò¡£
·my-huge.cnfÊÇΪÆóÒµÖеÄÊý¾Ý¿â¶øÉè¼ÆµÄ¡£ÕâÑùµÄÊý¾Ý¿âÒªÇóרÓ÷þÎñÆ÷ºÍ1GB»ò1GBÒÔÉϵÄRAM¡£
ÕâЩѡÔñ¸ß¶ÈÒÀÀµÓÚÄÚ´æµÄÊýÁ¿¡¢¼ÆËã»úµÄÔËËãËٶȡ¢Êý¾Ý¿âµÄϸ½Ú´óС¡¢·ÃÎÊÊý¾Ý¿âµÄÓû§ÊýÁ¿ÒÔ¼°ÔÚÊý¾Ý¿âÖÐ×°Èë²¢·ÃÎÊÊý¾ÝµÄÓû§ÊýÁ¿¡£Ëæ×ÅÊý¾Ý¿âºÍÓû§µÄ²»¶ÏÔö¼Ó£¬Êý¾Ý¿âµÄÐÔÄÜ¿ÉÄܻᷢÉú±ä»¯¡£
ÎÒ½«Öð¸öµÄ˵Ã÷ÕâЩÅäÖÃÎļþ¡£Èç¹ûÓû§¾ö¶¨Ê¹ÓÃmy-*.cnfÎļþÖ®Ò»£¬½«Ê×ÏÈÐèÒª°ÑÕâ¸öÎļþ¸´ÖƵ½/etc/my.cnfÎļþÉÏ¡£
ÓÉÓÚÕâЩÔÒò£¬Óû§Ó¦¸Ã×Ðϸ¹Û²ìÊý¾Ý¿âϵͳµÄÐÔÄÜ¡£Èç¹û·¢ÏÖÎÊÌ⣬¿ÉÄÜÐèÒªÔö¼Ó¸ü¶àµÄRAM£¬»òÕß°ÑÊý¾Ý¿âǨÒƵ½Ò»¸öº¬Óи½¼Ó×ÊÔ´(±ÈÈç¶à¸öCPU)µÄϵͳÉÏ¡£
Ìáʾ£ºÊý¾Ý¿â±äµÃ·Ç³£´ó¡£°ÑÒ»¸öSQLÊý¾Ý¿âĿ¼ÅäÖÃÔÚÒ»¸öרÓ÷ÖÇøÉÏ¿ÉÄܸüÓеÀÀí¡£ËäȻһ¸ö²»¶ÏÔö³¤µÄÊý¾Ý¿â¿ÉÄÜ»áÕ¼ÂúÕû¸ö·ÖÇø£¬µ«ËüÖÁÉÙ²»»áÍ̵ôRHELÔËÐÐËù±ØÐèµÄ´ÅÅ̿ռ䡣
/etc/my.cnfÎļþ
Ĭ ÈÏÊÇ/etc/my.cnfÎļþ¡£Ëü°üº¬6ÌõÃüÁ²¢ÇÒÕâ6ÌõÃüÁî±»×éÖ¯ÔÚ3¸öÅäÖöÎÖС£ÕâЩÅäÖöÎÓëSambaÅäÖÃÎļþÖеÄÅäÖöÎÏàËÆ£¬²¢ÇÒº¬Óй¦ÄÜ×é Ãû³ÆºÍÏà¹ØµÄÃüÁî¡£±¾ÎĽ«ÖðÐеÄ˵Ã÷Õâ¸öÎļþµÄĬÈÏ°æ±¾¡£Èç¹ûÓû§½øÐÐÁËÈκÎÐ޸ģ¬½«ÐèҪȷ±£MySQLÆô¶¯½Å±¾(¼´ /etc/rc.d/init.d/mysqld)ÖеÄÃüÁîÒ»Ö¡£
[my
Ïà¹ØÎĵµ£º
ÎÒÃǵÄÏîÄ¿ÖÐÓкö಻µÈÓÚµÄÇé¿ö¡£½ñÌìдÕâƪÎÄÕ¼òµ¥µÄ·ÖÎöÒ»ÏÂÔõô¸öÓÅ»¯·¨¡£
ÕâÀïµÄ·Ö±íÂß¼ÊǸù¾Ýt_group±íµÄuser_name×éµÄ¸öÊýÀ´·ÖµÄ¡£
ÒòΪÕâÖÖÇé¿öµ¥¶Àuser_name×Ö¶ÎÉϵÄË÷Òý¾ÍÊôÓÚÀÃË÷Òý¡£Æð²»ÁËɶÃûÃ÷ÏÔµÄЧ¹û¡£
1¡¢ÊÔÑéPROCEDURE.
DELIMITER $$
DROP PROCEDURE `t_girl`.`sp_split_table`$$
CREATE PROCE ......
Error Code : 1418
This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)
(0 ms taken)
·ÖÎö£º
¸ù¾ÝϵͳÌáʾ£¬µ¼Ö¸ôíÎóµÄÔÒò¿ÉÄÜÊÇÒ»¸ö°²È«ÉèÖ÷½Ãæ ......
ÔÚ³ÌÐò¿ª·¢ÖУ¬ÓÐʱ»á±»×Ö·ûÂÒÂëµÄÎÊÌâËùÀ§ÈÅ¡£¶Ô´Ë£¬±ØÐëÀí½â MySQL µÄ×Ö·û¼¯±àÂëÉèÖõÄÔÀí£ºÔÚMySQLÖУ¬Ä¬ÈÏʹÓõÄÊÇlartin1£¬Ò²¾ÍÊÇISO8859-1×Ö·û¼¯±àÂë¡£ÕâÊÇÒ»ÖÖ8λµÄ±àÂ룬ÊÊÓÃÓÚËùÓÐÎ÷Å·×Ö·û¡£¶ø¶ÔÓÚºº×ÖµÈÊDz»ºÏÊʵġ£×îºÃ¡¢×îͨÓõıàÂë¸ñʽÊÇutf-8£¬UTF-8£¨8 λԪ Universal Cha ......
1.ʲôÊÇUDF? UDF(user-defined function)ÊÇmysqlΪÓû§ÌṩµÄ×Ô¶¨Ò庯ÊýµÄÀ©Õ¹½Ó¿Ú¡£Ëü±¾ÖÊÉϺÍmysqlÌṩµÄmax¡¢minºÍcountµÈº¯ÊýÀàËÆ¡£ 2.UDF¿ÉÒÔ×öʲô? UDFÊÇ×Ô¶¨Ò庯Êý£¬ËùÒÔËüÄÜ×öʲôÍêÈ«È¡¾öÓÚÄãµÄʵÏÖ¡£UDF¿ÉÒÔÔÚÆÕͨµÄsql¡¢triggerÒÔ¼°store procedure±»µ÷ÓᣠÈç¹û×Ô¶¨ÒåÒ»¸ötcp_send(ip,port,msg)µ ......