Useful tip – max user connections on Shared Hosting

One of the funniest and useful things some users tend to do when having a max connection limitation on MySQL is to create several users cyclically or even randomly.

$db_users = array("db_user1","db_user2","db_user3","db_user4","db_user5","db_user7"...);

$db_user = $users [rand(0,5)];

$db_connection = new mysqli($db_host, $db_user, $db_password, $db_name);

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *