C:UsersJilil>mysql -u root -p
Enter password: *************
ERROR 1040 (HY000): Too many connections
C:UsersJilil>
C:UsersJilil>
java.sql.SQLNonTransientConnectionException: Data source rejected establishment of connection, message from server: "Too many connections"
Solution:
show variables like "max_connections";
set global max_connections = 200;
or if you can't connect:
systemctl daemon-reload
systemctl restart mysql