Python SQLite: database is locked

后端 未结 20 1156
一生所求
一生所求 2020-12-12 14:24

I\'m trying this code:

import sqlite

connection = sqlite.connect(\'cache.db\')
cur = connection.cursor()
cur.execute(\'\'\'create table item
  (id integer p         


        
20条回答
  •  自闭症患者
    2020-12-12 15:10

    In Linux you can do something similar, for example, if your locked file is development.db:

    $ fuser development.db This command will show what process is locking the file:

    development.db: 5430 Just kill the process...

    kill -9 5430 ...And your database will be unlocked.

提交回复
热议问题