why would MySQL need to now who was locking the record?
if your application needs to know who locked the record, then your appliciation needs to provide that to the db. whether you do that as part of an audit record thats up to you
as to how you identify the user to the db, you do that as part of the connection, through what ever mechanism you are using.... the front end has to estgablish a connection to the db..... normally thats where you would sepcify the userid and password