Mysql communication failure during hand shake

Communication failure during hand shake: is mysql server running on
localhost 3306 port.

This is the most common error which mysql users encounter.

The following is the solution for the mentioned versions below:

Mysql Ver: 4.1

Solution:
Go to mysql prompt.
run the command:
set password for (user-name)@(server-name) = old_password(“ur-password”);

Fill in the brackets with ur details and there u go!!!

Another common problem, is unable to find the mysql driver.
Just put the driver in tomcat/shared/classes
or tomcat/common/classes

About the author

I work with customers helping them achieve more using Microsoft Technologies. I am in my 9th year with Microsoft as of March 2020. I get to work with really smart people (both at Microsoft and Customers). Helping customers, removing any blockers, rapid prototyping is my core work.