{"id":1180,"date":"2015-12-12T02:22:37","date_gmt":"2015-12-12T00:22:37","guid":{"rendered":"http:\/\/www.shukko.com\/x3\/?p=1180"},"modified":"2021-03-19T07:15:50","modified_gmt":"2021-03-19T05:15:50","slug":"mysql-innodb-crash-toplu-yazisi","status":"publish","type":"post","link":"https:\/\/www.shukko.com\/x3\/2015\/12\/12\/mysql-innodb-crash-toplu-yazisi\/","title":{"rendered":"MySQL INNODB CRaSh Toplu yazisi."},"content":{"rendered":"<p>MySQL INNODB Crash etti. Napicaz?<\/p>\n<p>1- nano \/etc\/my.cnf<\/p>\n<p>innodb_force_recovery = 2<\/p>\n<p>2den basla 6ya kadar yolu var<\/p>\n<p>GUNCELLEME: Agustos 2018<\/p>\n<p>Be sure to check your MySQL logs, and if it loops with something like:<\/p>\n<pre>InnoDB: Waiting for the background threads to start<\/pre>\n<p>You should also add\u00a0<code>innodb_purge_threads=0<\/code>\u00a0to your\u00a0<tt>my.cnf<\/tt>.<\/p>\n<p>So all together to bring back database, I had to add these 3 parameters in my.cnf:<\/p>\n<pre class=\"\">port = 8881\ninnodb_force_recovery=3\ninnodb_purge_threads=0<\/pre>\n<p>2- killall -9 mysqld<\/p>\n<p>calisan bir mysql processi kalmasin<\/p>\n<p>3- innodb recovery ile calistiktan sonra read only olarak.<\/p>\n<p>herseyi dump et tek buyuk bir dosyaya<\/p>\n<pre class=\"lang:default decode:true \">cat \/usr\/local\/directadmin\/conf\/mysql.conf\n\nmysqldump -u da_admin -p --opt --all-databases &gt; alldb.sql<\/pre>\n<p>4- \/var\/lib\/mysql altindaki<\/p>\n<p>ibdata1<br \/>\nib_logfile0<br \/>\nib_logfile1<\/p>\n<p>sil, veya sen en iyisi tum \/mysql dizinini yedekle sonra sil<\/p>\n<p>5- herseyi restore et buyuk dosya yedeginden.<\/p>\n<p>mysql -u da_admin -p &lt; alldb.sql<\/p>\n<p>server.err logu tail le duruma bak<\/p>\n<p>gule gule kullan.<\/p>\n<p>NOT: 2021 mart::<\/p>\n<p>Use the\u00a0<code>--force<\/code>\u00a0(<code>-f<\/code>) flag on your mysql import. Rather than stopping on the offending statement, MySQL will continue and just log the errors to the console.<\/p>\n<p>For example:<\/p>\n<pre class=\"lang-sql s-code-block hljs\"><code>mysql <span class=\"hljs-operator\">-<\/span>u userName <span class=\"hljs-operator\">-<\/span>p <span class=\"hljs-operator\">-<\/span>f <span class=\"hljs-operator\">-<\/span>D dbName <span class=\"hljs-operator\">&lt;<\/span> script.sql<\/code><\/pre>\n<p>ek:<\/p>\n<p>aynisi oldu 1 serverda db leri dump ederken 1 table hata veriyordu.<\/p>\n<p>inatla hangi table hangi db icinde onuda bulamadim crash diyip duruyodu<\/p>\n<p>ne yaptim<\/p>\n<p>updatedb<\/p>\n<p>locate crashedentable.frm<\/p>\n<p>frm ler cikinca tek tek hepsini (1den cok vardi ) 12 tane toplam<\/p>\n<p>el ile fix ettim. aslinda otomatik auto-repair calismasi gerekirdi.<\/p>\n<p>calismadi pust nedense ..<\/p>\n<pre class=\"lang:default decode:true \">mysqlcheck -u da_admin -p --auto-repair --optimize --all-databases\n\nbu yukairdaki otomatik olan hepsini fixleyen. neden calismadiki acep. bilinmez..\n\nben naptim:\n\nmysqlcheck -u da_admin -p --auto-repair --databases esila_shop eticaret2_shop\n\nbu ise yaradi.\n\nbilgim olsun :)\n\nartik kod modundanda cikalim..\n<\/pre>\n<p>evet\/.\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MySQL INNODB Crash etti. Napicaz? 1- nano \/etc\/my.cnf innodb_force_recovery = 2 2den basla 6ya kadar yolu var GUNCELLEME: Agustos 2018 Be sure to check your MySQL logs, and if it loops with something like: InnoDB: Waiting for the background threads to start You should also add\u00a0innodb_purge_threads=0\u00a0to your\u00a0my.cnf. So all together to bring back database, I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1180","post","type-post","status-publish","format-standard","hentry","category-kategerisiz"],"_links":{"self":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/1180","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/comments?post=1180"}],"version-history":[{"count":5,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/1180\/revisions"}],"predecessor-version":[{"id":1459,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/1180\/revisions\/1459"}],"wp:attachment":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/media?parent=1180"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/categories?post=1180"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/tags?post=1180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}