The invention discloses a method for accessing sqlite safely by multiple processes, which comprises the following steps: A, accessing of a database is divided into a read thread, a write thread and afile thread; B, the process in the step A queries the state of the database lock before accessing the database, if the database is locked, the thread preparing to access the database is in a waiting state, and after the lock is released, the thread preparing to access the database obtains the control right of the lock to operate on the database; C, the thread adopts the first-come-first-served principle to obtain the locks, after the operation of the thread to the database is completed, the locks are released, other thread obtains the lock state at this time and then operates on the database.The invention can improve the shortage of the prior art, creates an independent database access channel, solves the problem of concurrent access of the database, and avoids the situation that the database lock cannot be accessed.