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 innodb_purge_threads=0 to your my.cnf.
So all together to bring back database, I had to add these 3 parameters in my.cnf:
port = 8881
innodb_force_recovery=3
innodb_purge_threads=0
2- killall -9 mysqld
calisan bir mysql processi kalmasin
3- innodb recovery ile calistiktan sonra read only olarak.
herseyi dump et tek buyuk bir dosyaya
cat /usr/local/directadmin/conf/mysql.conf
mysqldump -u da_admin -p --opt --all-databases > alldb.sql
4- /var/lib/mysql altindaki
ibdata1
ib_logfile0
ib_logfile1
sil, veya sen en iyisi tum /mysql dizinini yedekle sonra sil
5- herseyi restore et buyuk dosya yedeginden.
mysql -u da_admin -p < alldb.sql
server.err logu tail le duruma bak
gule gule kullan.
NOT: 2021 mart::
Use the --force (-f) flag on your mysql import. Rather than stopping on the offending statement, MySQL will continue and just log the errors to the console.
For example:
mysql -u userName -p -f -D dbName < script.sql
ek:
aynisi oldu 1 serverda db leri dump ederken 1 table hata veriyordu.
inatla hangi table hangi db icinde onuda bulamadim crash diyip duruyodu
ne yaptim
updatedb
locate crashedentable.frm
frm ler cikinca tek tek hepsini (1den cok vardi ) 12 tane toplam
el ile fix ettim. aslinda otomatik auto-repair calismasi gerekirdi.
calismadi pust nedense ..
mysqlcheck -u da_admin -p --auto-repair --optimize --all-databases
bu yukairdaki otomatik olan hepsini fixleyen. neden calismadiki acep. bilinmez..
ben naptim:
mysqlcheck -u da_admin -p --auto-repair --databases esila_shop eticaret2_shop
bu ise yaradi.
bilgim olsun :)
artik kod modundanda cikalim..
evet/./