Hey, so I get a Driver error when I try to connect to my local mysql db. My code is in a servlet as follows

            Connection con=null;
            Statement smt=null;


I use the port because my server is located on port 3306...

dump the .newInstance(), it's superfluous.

Without knowing the actual error the cause of the problem will always remain guesswork.
But most likely you either don't have the correct driver or the database doesn't allow you to connect.