52AV璈A|52AV.ONE

 曉撖蝣
 蝡唾酉
敹急瑕
  • av隢憯BBS
  • 璈A
  • 芣瑟憭瘚
  • 鞎澆
  • 52av鋆貉摰
  • 銝剜-銝剖銝餅
Yahoo!憟拇撠
望: 璈A
Google憟拇撠
望: 璈A
     
亦: 2880|敺: 0
銝銝銝駁 銝銝銝駁

[mysql] MySQL 閮剖 閮瑁 SQL 隤瘜

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2015-11-8 22:27:36 | 芰閰脖 撣 |摨閬 |梯璅∪

蝔撘 Debug 敺敺Y洵銝銵餈質絲靘敺颲(蝔撘蝣澆云憭 compile ), 虫蝔桀瘜撠望臬敺W餈, 甇敺撖怠亦 DB, 撠勗 DB 憪敺, 隞亙停航蝔撘臬瑁芯 SQL 隤瘜.(隞乩芯誑 MySQL 箔蜓)

銋券餈質馱瘜舐 tcpdump wireshark 3306 port,憭芾

MySQL 撟曄車寞臭誑, 撠隞交甇∠嗡葉銝蝔, /etc/my.cnf(CentOS), restart mysql 喳:

蝚砌蝔: Slow query SQL 隤瘜:

  • log_slow_queries = /var/log/mysql/mysql-slow.log
  • long_query_time = 2 (頞 2蝘 SQL 隤瘜閮韏瑚, 閮剔凋暺靘閮日臭臭蝔格寞 XD)7 x; ]! P' i) t7 E1 E2 t# }

蝚砌蝔: 閮 MySQL Replication binlog:

  • log_bin = /var/log/mysql/mysql-bin.log (甇斗閬 mysqlbinlog 閫靘)
  • mysql 撠 INSERT/UPDATE/DELETE 隤瘜閮潭迨(雿航瘜航質雿喟銝), 航撖怎策 SLAVE 函 log 瑼! g: B! |* j7 x* c$ d" c. E

蝚砌蝔: 刻行迨寞, 撠 MySQL 瑁瘥銵隞文券質韏瑚:

  • log = /var/log/mysql/mysql.log
    3 K; `" }7 h/ B3 U; L$ U: ]

restart mysql 敺, tail -f /var/log/mysql/mysql.log 撠勗臭誑啣!

, q# P) ?7 W+ r, g. \

雿輻券

祉蝛閬

BT蝳

砍憛批捆靘餉衣雯頝臬批捆蝝颲行粹嗥蝬脩嚗摰撟湔遛嚗嚗甇脖誑銝嗅啣摰嗆摰撟湧翩鈭箏ㄚ孵舫脣伐銝憿亙祉璇甈橘芣遛18甇 雓蝯脣亦閬賬粹脩芣遛18甇脖芣撟渡雯閬賜雯頝臭嗥批捆鞈閮嚗撱箄降典舫脰蝬脰楝批捆蝝蝯蝜ICRA蝝摰鋆閮剖 (粹蝯行霅 祉蝬脣銝蝝瘛函隢憯啣嚗祉閮剜蝞∠)

QQ|撠暺撅||52AV璈A

GMT+8, 2024-11-21 21:15 , Processed in 0.066470 second(s), 19 queries .

蝯∠.撱

52avtv@gmail.com | QQ:2405733034     since 2015-01

鋆貉憒 敹恍敺 餈銵