{"id":112467,"date":"2018-08-02T08:02:30","date_gmt":"2018-08-02T00:02:30","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=112467"},"modified":"2018-07-26T11:17:36","modified_gmt":"2018-07-26T03:17:36","slug":"linux-peration-problem","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/linux-peration-problem.html","title":{"rendered":"linux\u8fd0\u7ef4\u5e38\u89c1\u95ee\u9898\u89e3\u51b3\u96c6\u9526"},"content":{"rendered":"
\u4f5c\u4e3alinux\u8fd0\u7ef4\uff0c\u591a\u591a\u5c11\u5c11\u4f1a\u78b0\u89c1\u8fd9\u6837\u90a3\u6837\u7684\u95ee\u9898\u6216\u6545\u969c\uff0c\u7528\u70b9\u5fc3\uff0c\u5e73\u65f6\u591a\u6ce8\u610f\u79ef\u7d2f\uff0c\u6c34\u5e73\u80af\u5b9a\u8d8a\u6765\u8d8a\u9ad8\u3002\u4e0b\u9762\u5c31\u662f\u5e38\u89c1\u95ee\u9898\u89e3\u51b3\u96c6\u9526\uff1a<\/p>\n
\u95ee\u9898\uff1a\u67d0\u5929\u7814\u53d1\u67d0\u540c\u4e8b\u627e\u6211\u8bf4\u5e2e\u4ed6\u770b\u770b\u4ed6\u5199\u7684shell\u811a\u672c\uff0c\u6b7b\u6d3b\u4e0d\u6267\u884c\uff0c\u62a5\u9519\u3002\u6211\u770b\u4e86\u4e0b\uff0c\u811a\u672c\u5f88\u7b80\u5355\uff0c\u4e5f\u6ca1\u6709\u5e38\u89c4\u6027\u7684\u9519\u8bef\uff0c\u62a5\u201c: bad interpreter: No such file or\u00a0 directory\u201d\u9519\u3002\u4e00
\n\u770b\u8fd9\u9519\uff0c\u6211\u5c31\u95ee\u4ed6\u662f\u4e0d\u662f\u5728windows\u4e0b\u7f16\u5199\u7684\u811a\u672c\uff0c\u7136\u540e\u5728\u4e0a\u4f20\u5230linux\u670d\u52a1\u5668\u7684\u2026\u2026\u679c\u7136\u3002
\n\u539f\u56e0\uff1a\u5728DOS\/Windows\u91cc\uff0c\u6587\u672c\u6587\u4ef6\u7684\u6362\u884c\u7b26\u4e3arn\uff0c\u800c\u5728*nix\u7cfb\u7edf\u91cc\u5219\u4e3an\uff0c\u6240\u4ee5DOS\/Windows\u91cc\u7f16\u8f91\u8fc7\u7684\u6587\u672c\u6587\u4ef6\u5230\u4e86*nix\u91cc\uff0c\u6bcf\u4e00\u884c\u90fd\u591a\u4e86\u4e2a^M\u3002
\n\u89e3\u51b3\uff1a
\n1\uff09\u91cd\u65b0\u5728linux\u4e0b\u7f16\u5199\u811a\u672c\uff1b
\n2\uff09vi :% s\/r\/\/g\u00a0 :%\u00a0 s\/^M\/\/g \uff08^M\u8f93\u5165\u7528Ctrl+v, Ctrl+m\uff09
\n\u9644\uff1ash -x \u811a\u672c\u6587\u4ef6\u540d \uff0c\u53ef\u4ee5\u5355\u6b65\u6267\u884c\u5e76\u56de\u663e\u7ed3\u679c\uff0c\u6709\u52a9\u4e8e\u6392\u67e5\u590d\u6742\u811a\u672c\u95ee\u9898\u3002<\/p>\n
\u95ee\u9898\uff1a\/var\/spool\/clientmqueue\u76ee\u5f55\u5360\u7528\u7a7a\u95f4\u8d85\u8fc7100G
\n\u539f\u56e0\uff1acron\u4e2d\u6267\u884c\u7684\u7a0b\u5e8f\u6709\u8f93\u51fa\u5185\u5bb9\uff0c\u8f93\u51fa\u5185\u5bb9\u4f1a\u4ee5\u90ae\u4ef6\u5f62\u5f0f\u53d1\u7ed9cron\u7684\u7528\u6237\uff0c\u800csendmail\u6ca1\u6709\u542f\u52a8\u6240\u4ee5\u5c31\u4ea7\u751f\u4e86\/var\/spool\/clientmqueue\u76ee\u5f55\u4e0b\u7684\u90a3\u4e9b\u6587\u4ef6\uff0c\u65e5\u79ef\u6708\u7d2f\u53ef\u80fd\u6491\u7834\u78c1\u76d8\u3002
\n\u89e3\u51b3\uff1a
\n1\uff09\u76f4\u63a5\u624b\u52a8\u5220\u9664\uff1als |xargs rm -f\u00a0 \uff1b
\n2\uff09\u5f7b\u5e95\u89e3\u51b3\uff1a\u5728cron\u7684\u81ea\u52a8\u6267\u884c\u8bed\u53e5\u540e\u52a0\u4e0a >\/dev\/null 2>&1<\/p>\n
\u95ee\u9898\uff1a\u67d0\u5929\u7814\u53d1\u67d0\u540c\u4e8b\u8bf410.50\u8bbf\u95ee10.52memcached\u670d\u52a1\u5f02 \u5e38\uff0c\u8ba9\u6211\u4eec\u68c0\u67e5\u4e0b\u770b\u7f51\u7edc\/\u670d\u52a1\/\u7cfb\u7edf\u662f\u5426\u6709\u5f02\u5e38\u3002\u68c0\u67e5\u53d1\u73b0\u7cfb\u7edf\u6b63\u5e38\uff0c\u670d\u52a1\u6b63\u5e38\uff0c10.50ping10.52\u4e5f\u6b63\u5e38\uff0c\u4f4610.50telnet10.52 \u5f88\u6162\u3002\u540c\u65f6\u53d1\u73b0\u8be5\u673a\u5668\u7684namesever\u662f\u4e0d\u8d77\u4f5c\u7528\u7684\u3002
\n\u539f\u56e0\uff1abecause your PC doesn\u2019t do a reverse DNS\u00a0 lookup on your IP then\u2026 when you telnet\/ftp into your linux box, it\u2019ll do a dns\u00a0 lookup on you\u3002
\n\u89e3\u51b3\uff1a
\n1)\u4fee\u6539\/etc\/hosts\u4f7fhostname\u548cip\u5bf9\u5e94\uff1b
\n2\uff09\u5728\/etc\/resolv.conf\u6ce8\u91ca\u6389nameserver\u6216\u8005\u627e\u4e00\u4e2a\u201c\u6d3b\u7684\u201dnameserver\u3002<\/p>\n
\u95ee\u9898\uff1a\u540c\u4e8b\u5728mysql\u91cc\u5efa\u8868\u5efa\u4e0d\u6210\u529f\uff0c\u63d0\u793a\u5982\u4e0b\uff1a
\nmysql>create table wosontest (colddname1 char(1));
\nERROR 1005 (HY000): Can\u2019t create table \u2018wosontest\u2019 (errno:\u00a0 30\uff09
\n\u7ecf\u68c0\u67e5mysql\u7528\u6237\u6743\u9650\u4ee5\u53ca\u76f8\u5173\u76ee\u5f55\u6743\u9650\u6ca1\u95ee\u9898\uff1b\u7528perror 30\u63d0\u793a\u4fe1\u606f\u4e3a\uff1aOS error code\u00a0 30:\u00a0\u00a0 Read-only file system
\n\u53ef\u80fd\u539f\u56e0\uff1a
\n1\uff09\u6587\u4ef6\u7cfb\u7edf\u635f\u574f\uff1b
\n2\uff09\u78c1\u76d8\u53c8\u574f\u9053\uff1b
\n3\uff09fstab\u6587\u4ef6\u914d\u7f6e\u9519\u8bef\uff0c\u5982\u5206\u533a\u683c\u5f0f\u9519\u8bef\u9519\u8bef(\u5c06ntfs\u5199\u6210\u4e86fat)\u3001\u914d\u7f6e\u6307\u4ee4\u62fc\u5199\u9519\u8bef\u7b49\u3002
\n\u89e3\u51b3\uff1a
\n1\uff09\u7531\u4e8e\u662f\u6d4b\u8bd5\u673a\uff0c\u91cd\u542f\u673a\u5668\u540e\u6062\u590d\uff1b
\n2\uff09\u7f51\u4e0a\u8bf4\u7528mount\u53ef\u89e3\u51b3\u3002<\/p>\n
\u95ee\u9898\uff1a\u67d0\u5929\u53d1\u73b0\u67d0\u53f0\u673a\u5668df -h\u5df2\u7528\u78c1\u76d8\u7a7a\u95f4\u4e3a90G\uff0c\u800cdu -sh\u00a0 \/*\u663e\u793a\u6240\u6709\u4f7f\u7528\u7a7a\u95f4\u52a0\u8d77\u6765\u624d30G\uff0c\u56e7\u3002\r\n\u539f\u56e0\uff1a\u53ef\u80fd\u67d0\u4eba\u76f4\u63a5\u7528rm\u5220\u9664\u67d0\u4e2a\u6b63\u5728\u5199\u7684\u6587\u4ef6\uff0c\u5bfc\u81f4\u6587\u4ef6\u5220\u4e86\u4f46\u78c1\u76d8\u7a7a\u95f4\u6ca1\u91ca\u653e\u7684\u95ee\u9898\r\n\u89e3\u51b3\uff1a\r\n1\uff09\u6700\u7b80\u5355\u91cd\u542f\u7cfb\u7edf\u6216\u8005\u91cd\u542f\u76f8\u5173\u670d\u52a1\u3002\r\n2\uff09\u5e72\u6389\u8fdb\u7a0b\r\n\/usr\/sbin\/lsof|grep deleted\r\nora\u00a0\u00a0\u00a0 25575 data\u00a0\u00a0 33u\u00a0\u00a0\u00a0\u00a0\u00a0 REG\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 65,65\u00a0\u00a0 4294983680\u00a0 \/oradata\/DATAPRE\/UNDOTBS009.dbf (deleted)\r\n\u4ecelsof\u7684\u8f93\u51fa\u4e2d\uff0c\u6211\u4eec\u53ef\u4ee5\u53d1\u73b0pid\u4e3a25575\u7684\u8fdb\u7a0b\u6301\u6709\u7740\u4ee5\u6587\u4ef6\u63cf\u8ff0\u53f7\uff08fd\uff09\u4e3a\u00a0 33\u6253\u5f00\u7684\u6587\u4ef6\/oradata\/DATAPRE\/UNDOTBS009.dbf\u3002\u5728\u6211\u4eec\u627e\u5230\u4e86\u8fd9\u4e2a\u6587\u4ef6\u4e4b\u540e\u53ef\u4ee5\u901a\u8fc7\u7ed3\u675f\u8fdb\u7a0b\u7684\u65b9\u5f0f\u6765\u91ca\u653e\u88ab\u5360\u7528\u7684\u7a7a \u95f4\uff1aecho\u00a0 > \/proc\/25575\/fd\/33\r\n3\uff09\u5220\u9664\u6b63\u5728\u5199\u7684\u6587\u4ef6\u4e00\u822c\u7528 cat \/dev\/null > file<\/pre>\n6.find\u6587\u4ef6\u63d0\u5347\u6027\u80fd<\/strong><\/div>\n\u95ee\u9898\uff1a\u5728tmp\u76ee\u5f55\u4e0b\u6709\u5927\u91cf\u5305\u542bpicture_*\u7684\u4e34\u65f6\u6587\u4ef6\uff0c\u6bcf\u5929\u665a\u4e0a2:30\u5bf9\u4e00\u5929\u524d\u7684\u6587\u4ef6\u8fdb\u884c\u6e05\u7406\u3002\u4e4b\u524d\u5728crontab\u4e0b\u8dd1\u5982\u4e0b\u811a\u672c\uff0c\u4f46\u662f\u53d1\u73b0\u811a\u672c\u6548\u7387\u5f88\u4f4e\uff0c\u6bcf\u6b21\u6267\u884c\u65f6\u8d1f\u8f7d\u731b\u6da8\uff0c\u5f71\u54cd\u5230\u5176\u4ed6\u670d\u52a1\u3002\r\n#!\/bin\/sh\r\nfind \/tmp -name \u201cpicture_*\u201d -mtime +1 -exec rm -f {} ;\r\n\u539f\u56e0\uff1a\u76ee\u5f55\u4e0b\u6709\u5927\u91cf\u6587\u4ef6\uff0c\u7528find\u5f88\u8017\u8d44\u6e90\u3002\r\n\u89e3\u51b3\uff1a\r\n#!\/bin\/sh\r\ncd \/tmp\r\ntime=`date -d \u201c2 day ago\u201d \u201c+%b %d\u201d`\r\nls -l|grep \u201cpicture\u201d |grep \u201c$time\u201d|awk \u2018{print $NF}\u2019|xargs rm -rf<\/pre>\n7.\u83b7\u53d6\u4e0d\u4e86\u7f51\u5173mac\u5730\u5740<\/strong><\/div>\n\u95ee\u9898\uff1a\u4ece2.14\u52303.65\uff08\u6620\u5c04\u5730\u57402.141\uff09\u7f51\u7edc\u4e0d\u901a\uff0c\u4f46\u662f\u4ece3\u7aef\u7684\u5176\u4ed6\u673a\u5668\u52303.65\u7f51\u7edcOK\u3002
\n\u539f\u56e0\uff1a
\n# arp
\nAddress\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 HWtype\u00a0 HWaddress\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Flags\u00a0 Mask\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Iface
\n192.168.3.254\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ether\u00a0\u00a0 incomplet\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 CM\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 bond0
\n\u8868\u9762\u73b0\u8c61\u662f\u673a\u5668\u81ea\u52a8\u83b7\u53d6\u4e0d\u4e86\u7f51\u5173MAC\u5730\u5740\uff0c\u7f51\u7edc\u5de5\u7a0b\u5e08\u8bf4\u662f\u7f51\u7edc\u8bbe\u5907\u7684\u95ee\u9898\uff0c\u5177\u4f53\u4e0d\u6e05\u3002
\n\u89e3\u51b3\uff1a
\narp\u7ed1\u5b9a\uff0carp -i bond0 -s 192.168.3.254\u00a0 00:00:5e:00:01:64<\/p>\n8.http\u670d\u52a1\u65e0\u6cd5\u542f\u52a8\u4e00\u4f8b<\/strong><\/div>\n\u95ee\u9898\uff1a\u67d0\u5929\u7814\u53d1\u67d0\u540c\u4e8b\u8bf4\u7f51\u7ad9\u524d\u7aef\u73af\u5883http\u65e0\u6cd5\u542f\u52a8\uff0c\u6211\u4e0a\u53bb\u770b\u4e86\u4e0b\u3002\u62a5\u5982\u4e0b\u9519\uff1a
\n\/etc\/init.d\/httpd start
\nStarting httpd: [Sat Jan 29 17:49:00 2011] [warn] module\u00a0 antibot_module is already loaded, skipping
\nUse proxy forward as remote ip : true.
\nAntibot exclude pattern : .*.[(js|css|jpg|gif|png)]
\nAntibot seed check pattern : login
\n(98)Address already in use: make_sock: could not bind to\u00a0 address [::]:7080
\n(98)Address already in use: make_sock: could not bind to\u00a0 address 0.0.0.0:7080
\nno listening sockets available, shutting down
\nUnable to open log\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 [FAILED]
\n\u539f\u56e0\uff1a
\n1\uff09\u7aef\u53e3\u88ab\u5360\u7528\uff1a\u8868\u9762\u770b\u662f7080\u7aef\u53e3\u88ab\u5360\u7528\uff0c\u4e8e\u662fnetstat -npl|grep\u00a0 7080\u770b\u4e86\u4e0b\u53d1\u73b07080\u6ca1\u6709\u5360\u7528\uff1b
\n2\uff09\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\u91cd\u590d\u5199\u4e86\u7aef\u53e3\uff0c\u5982\u679c\u5728\u4ee5\u4e0b\u4e24\u4e2a\u6587\u4ef6\u540c\u65f6\u5199\u4e86Listen 7080
\n\/etc\/httpd\/conf\/http.conf
\n\/etc\/httpd\/conf.d\/t.10086.cn.conf
\n\u89e3\u51b3\uff1a
\n\u6ce8\u91ca\u6389\/etc\/httpd\/conf.d\/t.10086.cn.conf\u7684Listen\u00a0 7080\uff0c\u91cd\u542f\uff0cOK\u3002<\/p>\n9.too many open file<\/strong><\/div>\n\u95ee\u9898\uff1a\u62a5too many open file\u9519\u8bef\r\n\u89e3\u51b3\uff1a\u7ec8\u6781\u89e3\u51b3\u65b9\u6848\r\necho \u201c\u201d >> \/etc\/security\/limits.conf\r\necho \u201c*\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 soft\u00a0\u00a0 nproc\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 65535\u2033 >>\u00a0 \/etc\/security\/limits.conf\r\necho \u201c*\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 hard\u00a0\u00a0 nproc\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 65535\u2033 >>\u00a0 \/etc\/security\/limits.conf\r\necho \u201c*\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 soft\u00a0\u00a0 nofile\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 65535\u2033 >>\u00a0 \/etc\/security\/limits.conf\r\necho \u201c*\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 hard\u00a0\u00a0 nofile\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 65535\u2033 >>\u00a0 \/etc\/security\/limits.conf\r\necho \u201c\u201d >> \/root\/.bash_profile\r\necho \u201culimit-n\u00a0\u00a0 65535\u2033 >> \/root\/.bash_profile\r\necho \u201culimit\u00a0 -u\u00a0\u00a0 65535\u2033 >> \/root\/.bash_profile\r\n\u6700\u540e\u91cd\u542f\u673a\u5668 \u6216\u8005\u6267\u884c ulimit -u 655345 && ulimit -n 65535<\/pre>\n10.ibdata1\u548cmysql-bin\u81f4\u78c1\u76d8\u7a7a\u95f4\u95ee\u9898<\/strong><\/div>\n\u95ee\u9898\uff1a2.51\u78c1\u76d8\u7a7a\u95f4\u62a5\u8b66\uff0c\u7ecf\u67e5\u53d1\u73b0ibdata1\u548cmysql-bin\u65e5\u5fd7\u5360\u7528\u7a7a\u95f4\u592a\u591a\uff08\u5176\u4e2dibdata1\u8d85\u8fc7120G\uff0cmysql-bin\u8d85\u8fc780G\uff09
\n\u539f\u56e0\uff1aibdata1\u662f\u5b58\u50a8\u683c\u5f0f\uff0c\u5728INNODB\u7c7b\u578b\u6570\u636e\u72b6\u6001\u4e0b\uff0cibdata1\u7528\u6765\u5b58\u50a8\u6587\u4ef6\u7684\u6570\u636e\u548c\u7d22\u5f15\uff0c\u800c\u5e93\u540d\u7684\u6587\u4ef6\u5939\u91cc\u7684\u90a3\u4e9b\u8868\u6587\u4ef6\u53ea\u662f\u7ed3\u6784\u800c\u5df2\u3002
\ninnodb\u5b58\u50a8\u5f15\u64ce\u6709\u4e24\u79cd\u8868\u7a7a\u95f4\u7684\u7ba1\u7406\u65b9\u5f0f\uff0c\u5206\u522b\u662f\uff1a
\n1\uff09\u5171\u4eab\u8868\u7a7a\u95f4\uff08\u53ef\u62c6\u5206\u4e3a\u591a\u4e2a\u5c0f\u7684\u8868\u7a7a\u95f4\u6587\u4ef6\uff09\uff0c\u8fd9\u4e2a\u662f\u6211\u4eec\u76ee\u524d\u591a\u6570\u6570\u636e\u5e93\u4f7f\u7528\u7684\u65b9\u6cd5\uff1b
\n2\uff09\u72ec\u7acb\u8868\u7a7a\u95f4\uff0c\u6bcf\u4e00\u4e2a\u8868\u6709\u4e00\u4e2a\u72ec\u7acb\u7684\u8868\u7a7a\u95f4\uff08\u78c1\u76d8\u6587\u4ef6\uff09
\n\u5bf9\u4e8e\u4e24\u79cd\u7ba1\u7406\u65b9\u5f0f\uff0c\u5404\u6709\u4f18\u52a3\uff0c\u5177\u4f53\u5982\u4e0b\uff1a
\n\u2460\u5171\u4eab\u8868\u7a7a\u95f4\uff1a
\n\u4f18\u70b9\uff1a\u53ef\u4ee5\u5c06\u8868\u7a7a\u95f4\u5206\u6210\u591a\u4e2a\u6587\u4ef6\u5b58\u653e\u5230\u4e0d\u540c\u7684\u78c1\u76d8\u4e0a\uff08\u8868\u7a7a\u95f4\u6587\u4ef6\u5927\u5c0f\u4e0d\u53d7\u8868\u5927\u5c0f\u7684\u9650\u5236\uff0c\u4e00\u4e2a\u8868\u53ef\u4ee5\u5206\u5e03\u5728\u4e0d\u540c\u6b65\u7684\u6587\u4ef6\u4e0a\uff09\u3002
\n\u7f3a\u70b9\uff1a\u6240\u6709\u6570\u636e\u548c\u7d22\u5f15\u5b58\u653e\u5728\u4e00\u4e2a\u6587\u4ef6\u4e2d\uff0c\u5219\u968f\u7740\u6570\u636e\u7684\u589e\u52a0\uff0c\u5c06\u4f1a\u6709\u4e00\u4e2a\u5f88\u5927\u7684\u6587\u4ef6\uff0c\u867d\u7136\u53ef\u4ee5\u628a\u4e00\u4e2a\u5927\u6587\u4ef6\u5206\u6210\u591a \u4e2a\u5c0f\u6587\u4ef6\uff0c\u4f46\u662f\u591a\u4e2a\u8868\u53ca\u7d22\u5f15\u5728\u8868\u7a7a\u95f4\u4e2d\u6df7\u5408\u5b58\u50a8\uff0c\u8fd9\u6837\u5982\u679c\u5bf9\u4e8e\u4e00\u4e2a\u8868\u505a\u4e86\u5927\u91cf\u5220\u9664\u64cd\u4f5c\u540e\u8868\u7a7a\u95f4\u4e2d\u5c06\u6709\u5927\u91cf\u7a7a\u9699\u3002\u5bf9\u4e8e\u5171\u4eab\u8868\u7a7a\u95f4\u7ba1\u7406\u7684\u65b9\u5f0f\u4e0b\uff0c\u4e00\u65e6\u8868\u7a7a\u95f4\u88ab \u5206\u914d\uff0c\u5c31\u4e0d\u80fd\u518d\u56de\u7f29\u4e86\u3002\u5f53\u51fa\u73b0\u4e34\u65f6\u5efa\u7d22\u5f15\u6216\u662f\u521b\u5efa\u4e00\u4e2a\u4e34\u65f6\u8868\u7684\u64cd\u4f5c\u8868\u7a7a\u95f4\u6269\u5927\u540e\uff0c\u5c31\u662f\u5220\u9664\u76f8\u5173\u7684\u8868\u4e5f\u6ca1\u529e\u6cd5\u56de\u7f29\u90a3\u90e8\u5206\u7a7a\u95f4\u4e86\u3002
\n\u2461\u72ec\u7acb\u8868\u7a7a\u95f4\uff1a\u5728\u914d\u7f6e\u6587\u4ef6\uff08my.cnf\uff09\u4e2d\u8bbe\u7f6e\uff1a innodb_file_per_table
\n\u7279\u70b9\uff1a\u6bcf\u4e2a\u8868\u90fd\u6709\u81ea\u5df2\u72ec\u7acb\u7684\u8868\u7a7a\u95f4\uff1b\u6bcf\u4e2a\u8868\u7684\u6570\u636e\u548c\u7d22\u5f15\u90fd\u4f1a\u5b58\u5728\u81ea\u5df2\u7684\u8868\u7a7a\u95f4\u4e2d\u3002
\n\u4f18\u70b9\uff1a\u8868\u7a7a\u95f4\u5bf9\u5e94\u7684\u78c1\u76d8\u7a7a\u95f4\u53ef\u4ee5\u88ab\u6536\u56de\uff08Drop table\u64cd\u4f5c\u81ea\u52a8\u56de\u6536\u8868\u7a7a\u95f4\uff0c\u5982\u679c\u5bf9\u4e8e\u5220\u9664\u5927\u91cf\u6570\u636e\u540e\u7684\u8868\u53ef\u4ee5\u901a\u8fc7:alter\u00a0 table tbl_name engine=innodb;\u56de\u7f29\u4e0d\u7528\u7684\u7a7a\u95f4\u3002
\n\u7f3a\u70b9\uff1a\u5982\u679c\u5355\u8868\u589e\u52a0\u8fc7\u5927\uff0c\u5982\u8d85\u8fc7100G\uff0c\u6027\u80fd\u4e5f\u4f1a\u53d7\u5230\u5f71\u54cd\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u5982\u679c\u4f7f\u7528\u5171\u4eab\u8868\u7a7a\u95f4\u53ef\u4ee5\u628a\u6587\u4ef6\u5206 \u5f00\uff0c\u4f46\u6709\u540c\u6837\u6709\u4e00\u4e2a\u95ee\u9898\uff0c\u5982\u679c\u8bbf\u95ee\u7684\u8303\u56f4\u8fc7\u5927\u540c\u6837\u4f1a\u8bbf\u95ee\u591a\u4e2a\u6587\u4ef6\uff0c\u4e00\u6837\u4f1a\u6bd4\u8f83\u6162\u3002\u5982\u679c\u4f7f\u7528\u72ec\u7acb\u8868\u7a7a\u95f4\uff0c\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u5206\u533a\u8868\u7684\u65b9\u6cd5\uff0c\u5728\u4e00\u5b9a\u7a0b\u5ea6\u4e0a\u7f13\u89e3\u95ee\u9898\u3002 \u6b64\u5916\uff0c\u5f53\u542f\u7528\u72ec\u7acb\u8868\u7a7a\u95f4\u6a21\u5f0f\u65f6\uff0c\u9700\u8981\u5408\u7406\u8c03\u6574innodb_open_files\u53c2\u6570\u7684\u8bbe\u7f6e\u3002
\n\u89e3\u51b3:
\n1\uff09ibdata1\u6570\u636e\u592a\u5927\uff1a\u53ea\u80fd\u901a\u8fc7dump\uff0c\u5bfc\u51fa\u5efa\u5e93\u7684sql\u8bed\u53e5\uff0c\u518d\u91cd\u5efa\u7684\u65b9\u6cd5\u3002
\n2\uff09mysql-bin Log\u592a\u5927\uff1a
\n\u2460\u624b\u52a8\u5220\u9664\uff1a
\n\u5220\u9664\u67d0\u4e2a\u65e5\u5fd7\uff1amysql>PURGE MASTER LOGS TO \u2018mysql-bin.010\u2032;
\n\u5220\u9664\u67d0\u5929\u524d\u7684\u65e5\u5fd7\uff1amysql>PURGE MASTER LOGS BEFORE \u20192010-12-22\u00a0 13:00:00\u2032;
\n\u2461\u5728\/etc\/my.cnf\u91cc\u8bbe\u7f6e\u53ea\u4fdd\u5b58N\u5929\u7684bin-log\u65e5\u5fd7
\nexpire_logs_days = 30\u00a0 \/\/Binary Log\u81ea\u52a8\u5220\u9664\u7684\u5929\u6570<\/p>\n\n\u539f\u6587\u6765\u81ea\uff1ahttps:\/\/blog.csdn.net\/KISSING_hu\/article\/details\/42113261?locationNum=6&fps=1<\/a><\/p>\n