Jump to content

Can 2 different programs right to and read from a MySQL database at the same time?


mysteriousmonkey29

Recommended Posts

Hello, I am creating a web comic aggregation website. I am currently working on the back end in PHP, which uses an RSS reader to update a MySQL database every so often. Than I want the front end to access this database every time a user accesses the website. However, it seems like this will inevitably cause simultaneous reading from and writing to the database, from the front and back ends, respectively. Is this going to cause problems down the line? Or can MySQL handle this without glitching?

 

Thanks in advance

Link to comment
Share on other sites

MySQL will lock records that are being read or written until the operation is finished. The data will be consistent. Different storage engines use different locking models, for example MyISAM locks an entire table while InnoDB locks only the necessary rows.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...