# Mysql locking

**URL:** <https://forum.kirupa.com/t/mysql-locking/269734>\
**Category:** Uncategorized\
**Created:** [August 31, 2008, 7:19pm UTC](https://forum.kirupa.com/t/mysql-locking/269734 "2008-08-31T19:19:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![darroosh](https://avatars.discourse-cdn.com/v4/letter/d/a88e4f/32.png) [@darroosh](https://forum.kirupa.com/u/darroosh)\
**Post date:** [August 31, 2008, 7:19pm UTC](https://forum.kirupa.com/t/mysql-locking/269734/1 "2008-08-31T19:19:58Z")

</div>

Hi all ,  
I’m new to mysql locking !

I’ve 2 questions :

the 1st : I quoted this line from this [tutorial](http://www.brainbell.com/tutors/php/php_mysql/When_and_how_to_lock_tables.html):

> 

If locks aren’t used, the _items_ table can be modified by another user,

It seems to me that the user they r talking abut is a mysql user , not a visitor to the site !

What i mean is if a read lock is hold for some user , only this user can select , but all of my website visitors are with the same mysql user !!  
I hope i understood it wrong !! I hope the word user refers to a visitors to the site not to a mysql user !!

Can some help me there please ??

The 2nd question : There is some point not clear for me , I programmed many PHP-mysql scripts befor knowing anything about locking , and no problem appeared ,

and another thing is how to use locking in mysql ? i didn’t understand if they mean that I should write the code to start and end the locking , or mysql manages this isssu itself …

Thanks for any trial to help …
