If a MySQL
database connection is already open from a script (say PHP
), is it advisable for another script (say python
) to access the same database table at the the same time? If not, what should be the alternative?
Database systems like MySQL are designed to accommodate this kind of multi-user access. They do this by employing locking mechanisms, most of which work in the background. The locking mechanisms prevent one user from trying to read a record while someone else is writing it, or two users from writing the same record at once.
See http://dev.mysql.com/doc/refman/5.0/en/internal-locking.html
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.