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

mysqlÈÕÖ¾³õ̽

mysqlÀï×î³£ÓõÄÈÕÖ¾ÓÐ4ÖÖ,·Ö±ðÊÇ:´íÎóÈÕÖ¾,¶þ½øÖÆÈÕÖ¾,²éѯÈÕÖ¾ÒÔ¼°Âú²éѯÈÕÖ¾. 1.´íÎóÈÕÖ¾»á¼Ç¼µ±mysqlÆô¶¯ºÍ¹Ø±ÕÒÔ¼°ÔËÐÐÖеĴíÎóÐÅÏ¢,¿ÉÒÔʹÓà --log-error[=file_name]À´Ö¸¶¨´íÎóÈÕÖ¾´æ·ÅÎļþ.µ±mysql serverÒì³£µÄʱºòÓ¦¸ÃÊ×ÏȲ鿴¸ÃÈÕÖ¾.ÆäʵÀïÃæҲûʲô,ÎÒÓ¢ÓïËļ¶Ã»¹ý,ÅäÉÏ´Ê°ÔĿǰΪֹ»¹Ã»ÓÐÅöµ½½â¾ö²»Á˵ÄÎÊÌâ,ºÇºÇ.ĬÈÏÊÇ´æ·ÅÔÚdatadirÀïµÄÖ÷»úÃû.err. 2.¶þ½øÖÆÈÕÖ¾´æ·ÅÁËËùÓеÄddlºÍdml²Ù×÷¼Ç¼ --log-bin[=file_name]Ñ¡ÏîÆô¶¯Ê±£¬mysqldдÈë°üº¬ËùÓиüÐÂÊý¾ÝµÄSQLÃüÁîµÄÈÕÖ¾Îļþ¡£Èç¹ûδ¸ø³öfile_nameÖµ£¬ ĬÈÏÃûΪ-binºóÃæËù¸úµÄÖ÷»úÃû¡£¶þ½øÖÆÈÕÖ¾²¢²»¿ÉÒÔÖ±½Ó²é¿´,ÐèÒª¿Í»§¶Ë¹¤¾ßmysqlbinlog log-file ²é¿´ mysqldÔÚÿ¸ö¶þ½øÖÆÈÕÖ¾ÃûºóÃæÌí¼ÓÒ»¸öÊý×ÖÀ©Õ¹Ãû¡£Ã¿´ÎÄãÆô¶¯·þÎñÆ÷»òË¢ÐÂÈÕ־ʱ¸ÃÊý×ÖÔòÔö¼Ó¡£Èç¹ûµ±Ç°µÄÈÕÖ¾´óС´ïµ½max_binlog_size£¬»¹»á×Ô¶¯´´½¨ÐµĶþ½øÖÆÈÕÖ¾¡£Èç¹ûÄãÕýʹÓôóµÄÊÂÎñ£¬¶þ½øÖÆÈÕÖ¾»¹»á³¬¹ýmax_binlog_size£ºÊÂÎñȫдÈëÒ»¸ö¶þ½øÖÆÈÕÖ¾ÖУ¬¾ø¶Ô²»ÒªÐ´È벻ͬµÄ¶þ½øÖÆÈÕÖ¾ÖС£ ΪÁËÄܹ»ÖªµÀ»¹Ê¹ÓÃÁËÄĸö²»Í¬µÄ¶þ½øÖÆÈÕÖ¾Îļþ£¬mysqld»¹´´½¨Ò»¸ö¶þ½øÖÆÈÕÖ¾Ë÷ÒýÎļþ£¬°üº¬ËùÓÐʹÓõĶþ½øÖÆÈÕÖ¾ÎļþµÄÎļþÃû¡£Ä¬ÈÏÇé¿öÏÂÓë¶þ½øÖÆÈÕÖ¾ÎļþµÄÎļþÃûÏàͬ£¬À©Õ¹ÃûΪ'.index'¡£Äã¿ÉÒÔÓÃ--log-bin-index[=file_name]Ñ¡Ïî¸ü¸Ä¶þ½øÖÆÈÕÖ¾Ë÷ÒýÎļþµÄÎļþÃû¡£µ±mysqldÔÚÔËÐÐʱ£¬²»Ó¦ÊÖ¶¯±à¼­¸ÃÎļþ£»Èç¹ûÕâÑù×ö½«»áʹmysqld±äµÃ»ìÂÒ¡£ ¿ÉÒÔÓÃÒÔÏÂÓï¾äɾ³ý¶þ½øÖÆÈÕÖ¾ reset master;#ɾ³ýËùÓжþ½øÖÆÈÕÖ¾ purge master logs to 'mysql-bin.******';#ɾ³ý******±àºÅ֮ǰµÄ¶þ½øÖÆÈÕÖ¾ purge master logs before 'yyyy-mm-dd hh24:mm:ss'#ɾ³ýÖ¸¶¨ÈÕÆÚ֮ǰµÄÈÕÖ¾ »¹¿ÉÒÔÉèÖÃ--expire_logs_days=*;#ÉèÖÃÈÕÖ¾¹ýÆÚÌìÊý,¹ýÆÚ×Ô¶¯É¾³ý. --binlog-do-db=db_name#Ö¸¶¨Êý¾Ý¿â¿ªÆô¶þ½øÖÆÈÕÖ¾,ÀàËƵÄÓÐignore. innodbÓÐ --innodb-safe-binlogÒÔ¼°--sync-binlog=n(ÿдn´ÎÈÕ־ͬ²½´ÅÅÌ) ¿ÉÒÔͨ¹ýset sql_log_bin=0½ûÓöþ½øÖÆÈÕÖ¾. 3.²éѯÈÕÖ¾,¼Ç¼ËùÓвéѯÓï¾ä,¶þ½øÖÆÈÕÖ¾²»¼Ç¼֮²éѯµÄÓï¾ä --log[=file_name]¿ÉÒÔÆô¶¯²éѯÈÕÖ¾,ĬÈÏÊÇÔÚdatadirÀïµÄÖ÷»úÃû.log,ÓÉÓÚ»áÏûºÄ´óÁ¿´ÅÅÌio×ÊÔ´,Ò»°ãÇé¿öϽ¨Òé½ûÓÃ. 4.Âý²éѯÈÕÖ¾ --log-slow-queries[=file_name]ĬÈÏÊÇÔÚdatadirϵÄÖ÷»úÃû.slow.log --log-short-format#ºöÂÔµô²»Ê¹ÓÃË÷ÒýµÄÂý²éѯ --log-slow-admin-statements#½«¼Ç¼Âý¹ÜÀíÓï¾ä set long_query_time=n;#


Ïà¹ØÎĵµ£º

windowsÏÂapache,mysql,php°²×°ÈÕ¼Ç

½ñÌì·ÏÁËÒ»ÌìµÄʱ¼äÀ´´Óаѻ·¾³´î½¨ºÃ£º×ö¸ö±Ê¼Ç
°²×°Ë³Ðò£º
apache->php->mysql
һЩעÒâµÄµØ·½¼ÇÏÂÀ´°É£º
1. apache Ö§³Ö php
    apache ÅäÖÃÎļþÏ£ºÐèÒªÐ޸ĵĵط½£º
       i.  PHPIniDir "F:/programs/php/"
    &n ......

ʹÓÃJavaʵÏÖ¶ÔMySqlÊý¾Ý¿âµÄµ¼ÈëÓëµ¼³ö

package com.project.ajaxs;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.util.Calendar;
import java.uti ......

mysql ´´½¨º¯ÊýµÄ1418´íÎó½â¾ö·½°¸

 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 UDF+triggerµÄÉñÆæħÁ¦

  1.ʲôÊÇUDF? UDF(user-defined function)ÊÇmysqlΪÓû§ÌṩµÄ×Ô¶¨Ò庯ÊýµÄÀ©Õ¹½Ó¿Ú¡£Ëü±¾ÖÊÉϺÍmysqlÌṩµÄmax¡¢minºÍcountµÈº¯ÊýÀàËÆ¡£ 2.UDF¿ÉÒÔ×öʲô? UDFÊÇ×Ô¶¨Ò庯Êý£¬ËùÒÔËüÄÜ×öʲôÍêÈ«È¡¾öÓÚÄãµÄʵÏÖ¡£UDF¿ÉÒÔÔÚÆÕͨµÄsql¡¢triggerÒÔ¼°store procedure±»µ÷ÓᣠÈç¹û×Ô¶¨ÒåÒ»¸ötcp_send(ip,port,msg)µ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ