I'm currently writing a program in java where I often get data from the MySQL database, with a JDBC driver. At first I tried to close the connection every time I ran the program to test it, but it gave an error at that line. I left the 'connection.close()' line out and it worked, which at the time was good enough for me.
Unfortunatly that backfired, because now I can't run the program anymore. It gives the following error.
Data source rejected estabilishment of connection, message from server: "Too many connections"
I honestly have no idea how to fix this. Another related app in Visual Studio rebuild the database every time I run that, so I don't think that's a problem. I deleted the databse in my java editor, Netbeans, and re-imported it, but that didn't solve it either. My googling skills have failed me as well, even the question on stackoverflow didn't seem to work.
Any help would be much appreciated