Error opening blockchain database

I installed litecoin core 2 days ago.
It took at least 24 hours. I stopped it part way through and started it again last night.
It finished this morning.

I put the data directory on my external hard drive so it wouldn’t chew up all that space on my laptop.

I moved my coins into the wallet and it all worked great.

I left the computer for a bit and came back to an error message saying “Error opening block database” or something like that … I had to force quit to get past it.

Then when I tried to restart the wallet this: “error opening block database. Do you want to rebuild the block database now” . I click on OK and get another message “Error opening block database”

I’ve tried to run it a few times now with the same result each time.

I suspect that my my laptop put my external drive into sleep mode while it was updating the block database and something got corrupted maybe? I would have thought there would be system in place to prevent this happening…

I hadn’t got a chance to backup my wallet since moving my coins into it.

I’ve tried to run from the command line with -reindex and it just give the error "“Error opening block database” and quits.

I don’t mind reinstalling but I’m afraid it will give me a new address and I won’t have my private key to get at my coins.

How can I get my private key out of there if it won’t run?

Can I troubleshoot this error and get it working again?

I’m on MacOS



But, did you took a backup of that wallet even if it is before moving your coins into it?
If so, you should be able to recover your private keys and your coins using that wallet.dat on another computer.

No. I never ran the backup function. I just finished installing it. Saw that the coins made it in, thought “that’s great”. went outside to run the snow blower for awhile and came back to the error message.

Okay. Don’t worry.

Please show me a screenshot of the moment the error occurs. Are you able to get into the litecoin-qt interface?
If you are able, you should be able to also take a backup of private keys and import them into another wallet.

I would suggest

I do have the receiving address that I sent the coins to. And I did see how to get the private key out of there before going outside but didn’t copy it down yet.

No. I can’t get into the litecoin-qt interface. It gives that error and quits before it lets me in there.

Please open this folder on your ¿finder? and send screenshot of its contents

~/Library/Application Support/Litecoin/

I am not a Mac user, so folder location may vary a bit.

As I tought. It seems that block database is corrupted.

Don’t worry. Block database and private keys are on different folder/files. So your private keys should remain safe.

look for this directory and send screenshot of its contents
~/Library/Application Support/Litecoin/

The directory does not exist there…


Please run this command on your terminal to find wallet.dat
I will show you how I do that on my GNU/Linux box in a minute.

find / -name wallet.dat -print 2>/dev/null

I installed on my external hardrive. The wallet.dat is there…

maybe i should delete ?

Oh right, you you know where it is.

Please make a backup right now.
Once you have the backup, please delete everything that is on the same directory that wallet.dat. I mean, delete all files and directories that are sibilings of it.

Once that is done, try reopening litecoin-qt.

Don’t forget to make a backup of wallet.dat.

This is odd. I am getting your messages late.

Delete everything on that picture but keep wallet.dat

just dont deleted any files from the external hardware… your wallet info if there.

his wallet is in wallet.dat. I already adviced him to make a backup of it.
Everything else can be safely deleted.

Just tried this to see what would happen:

/Applications/ -reindex

It won’t let me reply to this thread anymore because it’s my first day ?!?!