MohammadEzady0's avatar

SQLite is locked.

I use SQLite in my laravel project but when running this query: SELECT * FROM 'searches'; I get: Query 1: database is locked

0 likes
7 replies
CamKem's avatar

This has happend to me when it got corrupted as I was creating it. If it is a new project, you could try deleting your sqlite file & then go to your terminal and cd to where you store your sqlite file & run "touch database.sqlite"

CamKem's avatar

@MohammadEzady0 Generally "sqlite is locked" error occurs when the database is already in use. Do you have any processes running or other server that use this same database file?

As your migration run fine, there is not a connection issue, without knowing more it's kind of impossible for us to help much further.

MohammadEzady0's avatar
MohammadEzady0
OP
Best Answer
Level 1

I restart the laptop and everything worked out 😂😂😂😂

Please or to participate in this conversation.