I have something to add, in case others will need it.
can be changed in WHM > SQL Services > Edit SQL Configuration
max_user_connections = 25, I didn't have this in /etc/my.cnf and when added the load increased dramatically after some time, MySQL started to crash. Maybe the reason was that in Cloudlinux DB governor I had lower number of connections and max_user_connections overrides Cloudlinux settings, I don't know. When I removed it everything went back to normal.
Another thing, at first I thought this command(and the same above max_user_connections) limits cpanel user, but it actually limits database user inside a cpanel account. In my case, one cpanel account had 30+ MySQL users and this thing doesn't help at all.
Code:
ALTER USER 'specificUser'@'localhost' WITH MAX_USER_CONNECTIONS 25;
In this case you need to limit each DB user separately. Here is the command to list all users in the proper format to limit them
Code:
SELECT con cat("ALTER USER '", `user`, "'@'localhost' WITH MAX_USER_CONNECTIONS 1;") FROM `mysql`.`user`
("concat" should be together, the forum won't let me use it here)
If using phphmyadmin then click "options" below, full text, go. Then copy the needed user/s and execute the command. Setting connections to 1 reduced the load significantly in my case.