I am facing a deadlock in my MySQL. How can I configure MySQL to restart the transaction automatically when it encounters a deadlock?
Well, you can't and it would not make sense. It's up to your application to cope with deadlock and how it's done depends very much on your business logic, e.g. catch the exception, wait some seconds, retry x times ...