<p>I am using Bitcoin-Qt v0.8.2-beta on Mac with Mountain Lion (10.8.4), and my database gets corrupted every time I restart the Mac -.-</p>

<p>However, Bitcoin-Qt "just" recreates (?? don't know what the english word is, sorry) the Blockchain/Database (which always takes like 3 or 4 days) but no money is gone. I can't access my money while reindexing since it isn't verified though, but as said, it is still there and accessible after 4 days ;-)</p>

<p>When I quit Bitcoin-Qt manually before shutting down the Mac, then the Database doesn't get corrupted. But it is quite annoying to bear in mind about that every time.</p>

<p>Manually reinstalling the Database is possible but you will loose every address. Read here: <a href="https://en.bitcoin.it/wiki/Data_directory" rel="nofollow">https://en.bitcoin.it/wiki/Data_directory</a> where to look for the file you need to delete.
I didn't try this, since I actually have money stored on my addresses.</p>

<p>My RAM is brand new hand has no Errors.</p>

<p>If you still have troubles you might think of switching to an online-wallet. You can easily export your address like this:
Open Bitcoin-Qt > help > debug window > console > dumpprivkey YOUR_BITCOIN_ADDRESS
e.g.:
dumpprivkey 1DjEL..... will get you ..VcHHcF...
You can then import this "private key" on for example <a href="https://blockchain.info/de/wallet/" rel="nofollow">https://blockchain.info/de/wallet/</a> just by copying the private key into the "import" section.
This will work even during the reindexing process.</p>

<p>Hope, this helps :-)</p>

CC BY-SA 3.0
2013-08-01T12:07:15.183Z
2013-08-01T14:55:31.607Z
2013-08-01T14:55:31.607Z
swiknaba
<p>I cannot believe nobody posted the obvious....... please go to your %appdata% folder then roaming. then delete everything but the wallet.file, then and only then, un-install the program and re-install it. i am 99.999999999999999% sure this will solve your problem. i have worked a ton with the QT source code and am quite familiar with it. </p>

CC BY-SA 3.0
2013-12-02T05:39:32.367Z
2013-12-02T05:39:32.367Z
Just to answer 1 question
<p>Just delete the Blocks folder in %appdata%/bitcoin. You'll have to download again the whole Blocks database but hey, You've got your bitcoins back :D.</p>

CC BY-SA 3.0
2013-12-28T20:33:07.453Z
2013-12-28T20:33:07.453Z
kiroma
<p>Have you checked your disc allocation?  The entire Bitcoin db is in the neighbourhood of 14gb (as of today, 2/12/2013).  I moved the Bitcoin db to a folder on a different partition (with over 100gb of space) and the that resolved the issue for me.</p>

<p>The error message isn't very helpful, and neither is Windoze, but in my case the amount of free space on disc appears to have been the issue.</p>

CC BY-SA 3.0
2013-12-01T23:56:28.917Z
to clarify the day, I mean today as Dec 2, 2013.  :)
nodnarb
CC BY-SA 3.0
2013-12-01T23:55:23.537Z
2013-12-01T23:55:23.537Z
nodnarb
<p>I suggest you to use Bitcoin qt version 0.8.3,
and run it as Administrator.</p>

<p>And check whether there are some APP prevent QT 
to create data on Windows User Files.</p>

CC BY-SA 3.0
2013-07-16T05:48:39.293Z
2013-07-16T05:48:39.293Z
coinprize
<p>Using 0.14 and yes, you can remove the chain and wait for a week to fork it all in, but you stop and start a few times and it is corrupted again. Strange that bitcoin has the strongest development team and this corrupted database can not be easily solved. Just remove everything and start all over again waiting for a week.</p>

CC BY-SA 3.0
2017-04-13T20:55:37.053Z
2017-04-13T20:55:37.053Z
pcrs
<p>I think the error is hardware based. Ran memtest86 and found multiple errors in my RAM. Also got a blue screen for the first time last night. Makes sense, sometimes bitcoin qt would run for minutes, other times days. I think it was hitting a bad address at different times.</p>

<p>If anyone else is getting this error, test your RAM with memtest86. Probably should have done this first thing. Prime 95 could also be used to test your processor (let Prime 95 run overnight, if there are no errors in the morning you can be 95% sure your processor is in pefect condition. Run it longer, say 48 hours, to be more sure).
Test your hhd/ssd with CrystalDiskInfo; it should display your drive's health instantly. (hdd/ssd shouldn't cause this error, as your controller detects and automatically doesn't use bad sectors.)</p>

<p>Prime95:
<a href="http://files.extremeoverclocking.com/file.php?f=205" rel="noreferrer">http://files.extremeoverclocking.com/file.php?f=205</a></p>

<p>Memtest86:
<a href="http://www.memtest86.com" rel="noreferrer">http://www.memtest86.com</a></p>

<p>CrystalDiskInfo:
<a href="http://crystalmark.info/software/CrystalDiskInfo/index-e.html" rel="noreferrer">http://crystalmark.info/software/CrystalDiskInfo/index-e.html</a></p>

CC BY-SA 3.0
2014-06-06T19:24:04.227Z
If people plan on running tools like Prime95 then it would be a good idea to also run a program to monitor your CPU temperature to ensure it doesnt exceed the maximum recommended.
Matt
CC BY-SA 3.0
2017-11-16T20:49:42.283Z
Indeed, but the CPU temperature exceeding the maximum recommended temperature is likely a pretty good indication that the hardware is your issue.
Matt Corallo
CC BY-SA 3.0
2013-07-16T10:12:39.730Z
2013-07-16T10:12:39.730Z
Starkers
<p>So I turn on my computer this morning, and I find Bitcoin QT has quit of its own accord. 
I try to turn it back on and I get this message.</p>

<p>"Bitcoin - Error System error: Database corrupted"</p>

<p><img src="https://i.sstatic.net/AFVAd.png" alt="Bitcoin QT error"></p>

<p>I'm fairly sure Windows 7 restarted itself to install updates. Is this what caused the corruption?</p>

<p>Luckily, I have zero bitcoins, and I've reinstalled Bitcoin QT without any problems, but this will stress me out if I want to mine bitcoins while out of town.  </p>

<p>Apparently, if the database is corrupted, you may have lost your wallet and all your money!</p>

<p>My question is, is this true, and how can I prevent this error from appearing again? What can cause it? I've turned off windows automatic update, so that should mean we're okay? What happens in a powercut? Wish Bitcoin QT was more robust :(</p>

<p><em>update</em> Even weirder, I gave the corrupted Bitcoin QT a try and for no reason at all, it started and didn't give me the error. Really scared of loosing all my money. Can someone explain what's happening? Thanks a lot guys.</p>

<p><em>update</em> Nope. Dispite working, it is still corrupted. It gets stuck on 86 weeks forever.</p>

<p>Tried to get in via bitcoind to reindex the database:
<img src="https://i.sstatic.net/A1M8A.png" alt="rebuild database"></p>

<p>Tried <strong>uninstalling everything</strong> and reeboting my computer and resinstalling bitcoin-qt:</p>

<p>Thought it was working, but the second it got onto 85 weeks remaining:</p>

<p><img src="https://i.sstatic.net/kOIP9.png" alt="corrupted"></p>

<p>Gentlemen, please help. Logically thinking about it, it must be the same database it's using, that somehow survived the reinstall. Maybe if someone could point me towards where this database is stored so I can delete it manually?</p>

<p>Brand new computer, 64 bit genuine windows 7. Barely any programs installed. Can't believe how flaky this open source software is. </p>

CC BY-SA 3.0
2013-07-16T07:53:10.587Z
Backup your database
jobukkit
CC BY-SA 3.0
2015-06-18T02:31:25.193Z
Make sure your system time didn't change dramatically from what it was before you got this issue. If your time is wrong, it Bitcoin-QT will think you're missing part of the blockchain.
Geremia
<bitcoin-core>
Bitcoin QT error. How can I prevent corruption of database?
Starkers
# Bitcoin QT error. How can I prevent corruption of database?

(Asked by: username_0 on 2013-07-14)

So I turn on my computer this morning, and I find Bitcoin QT has quit of its own accord.
I try to turn it back on and I get this message.

"Bitcoin - Error System error: Database corrupted"

![Bitcoin QT error](https://i.sstatic.net/AFVAd.png)

I'm fairly sure Windows 7 restarted itself to install updates. Is this what caused the corruption?

Luckily, I have zero bitcoins, and I've reinstalled Bitcoin QT without any problems, but this will stress me out if I want to mine bitcoins while out of town.

Apparently, if the database is corrupted, you may have lost your wallet and all your money!

My question is, is this true, and how can I prevent this error from appearing again? What can cause it? I've turned off windows automatic update, so that should mean we're okay? What happens in a powercut? Wish Bitcoin QT was more robust :(

*update* Even weirder, I gave the corrupted Bitcoin QT a try and for no reason at all, it started and didn't give me the error. Really scared of loosing all my money. Can someone explain what's happening? Thanks a lot guys.

*update* Nope. Dispite working, it is still corrupted. It gets stuck on 86 weeks forever.

Tried to get in via bitcoind to reindex the database:
![rebuild database](https://i.sstatic.net/A1M8A.png)

Tried **uninstalling everything** and reeboting my computer and resinstalling bitcoin-qt:

Thought it was working, but the second it got onto 85 weeks remaining:

![corrupted](https://i.sstatic.net/kOIP9.png)

Gentlemen, please help. Logically thinking about it, it must be the same database it's using, that somehow survived the reinstall. Maybe if someone could point me towards where this database is stored so I can delete it manually?

Brand new computer, 64 bit genuine windows 7. Barely any programs installed. Can't believe how flaky this open source software is.

**Tags:** bitcoin-core

> **Comments:**
> **username_1**: Backup your database  
> **username_2**: Make sure your system time didn't change dramatically from what it was before you got this issue. If your time is wrong, it Bitcoin-QT will think you're missing part of the blockchain.  

---

## 7 answers

### Answer by username_0 on 2013-07-16. Score: 5 | Accepted answer

I think the error is hardware based. Ran memtest86 and found multiple errors in my RAM. Also got a blue screen for the first time last night. Makes sense, sometimes bitcoin qt would run for minutes, other times days. I think it was hitting a bad address at different times.

If anyone else is getting this error, test your RAM with memtest86. Probably should have done this first thing. Prime 95 could also be used to test your processor (let Prime 95 run overnight, if there are no errors in the morning you can be 95% sure your processor is in pefect condition. Run it longer, say 48 hours, to be more sure).
Test your hhd/ssd with CrystalDiskInfo; it should display your drive's health instantly. (hdd/ssd shouldn't cause this error, as your controller detects and automatically doesn't use bad sectors.)

Prime95:
<http://files.extremeoverclocking.com/file.php?f=205>

Memtest86:
<http://www.memtest86.com>

CrystalDiskInfo:
<http://crystalmark.info/software/CrystalDiskInfo/index-e.html>

> **Comments:**
> **username_9**: If people plan on running tools like Prime95 then it would be a good idea to also run a program to monitor your CPU temperature to ensure it doesnt exceed the maximum recommended.  
> **username_10**: Indeed, but the CPU temperature exceeding the maximum recommended temperature is likely a pretty good indication that the hardware is your issue.  

---

### Answer by username_3 on 2013-08-01. Score: 1

I am using Bitcoin-Qt v0.8.2-beta on Mac with Mountain Lion (10.8.4), and my database gets corrupted every time I restart the Mac -.-

However, Bitcoin-Qt "just" recreates (?? don't know what the english word is, sorry) the Blockchain/Database (which always takes like 3 or 4 days) but no money is gone. I can't access my money while reindexing since it isn't verified though, but as said, it is still there and accessible after 4 days ;-)

When I quit Bitcoin-Qt manually before shutting down the Mac, then the Database doesn't get corrupted. But it is quite annoying to bear in mind about that every time.

Manually reinstalling the Database is possible but you will loose every address. Read here: <https://en.bitcoin.it/wiki/Data_directory> where to look for the file you need to delete.
I didn't try this, since I actually have money stored on my addresses.

My RAM is brand new hand has no Errors.

If you still have troubles you might think of switching to an online-wallet. You can easily export your address like this:
Open Bitcoin-Qt > help > debug window > console > dumpprivkey YOUR\_BITCOIN\_ADDRESS
e.g.:
dumpprivkey 1DjEL..... will get you ..VcHHcF...
You can then import this "private key" on for example <https://blockchain.info/de/wallet/> just by copying the private key into the "import" section.
This will work even during the reindexing process.

Hope, this helps :-)


---

### Answer by username_4 on 2013-12-02. Score: 1

I cannot believe nobody posted the obvious....... please go to your %appdata% folder then roaming. then delete everything but the wallet.file, then and only then, un-install the program and re-install it. i am 99.999999999999999% sure this will solve your problem. i have worked a ton with the QT source code and am quite familiar with it.


---

### Answer by username_5 on 2013-12-28. Score: 0

Just delete the Blocks folder in %appdata%/bitcoin. You'll have to download again the whole Blocks database but hey, You've got your bitcoins back :D.


---

### Answer by username_6 on 2013-12-01. Score: 0

Have you checked your disc allocation? The entire Bitcoin db is in the neighbourhood of 14gb (as of today, 2/12/2013). I moved the Bitcoin db to a folder on a different partition (with over 100gb of space) and the that resolved the issue for me.

The error message isn't very helpful, and neither is Windoze, but in my case the amount of free space on disc appears to have been the issue.

> **Comments:**
> **username_6**: to clarify the day, I mean today as Dec 2, 2013.  :)  

---

### Answer by username_7 on 2013-07-16. Score: 0

I suggest you to use Bitcoin qt version 0.8.3,
and run it as Administrator.

And check whether there are some APP prevent QT
to create data on Windows User Files.


---

### Answer by username_8 on 2017-04-13. Score: 0

Using 0.14 and yes, you can remove the chain and wait for a week to fork it all in, but you stop and start a few times and it is corrupted again. Strange that bitcoin has the strongest development team and this corrupted database can not be easily solved. Just remove everything and start all over again waiting for a week.


---

