Do I need to rerun below command with mysql-connector-java for version 5.1.40 or just unlink the existing one and redirect to the new mysql-connector-java.jar?
ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jar
Thanks for your quick response. Your solution worked. Now there are no errors in ambari-server.log file.