Refactored the code, handled proper authentication at mysql proxy class by replaying the client auth queries.