I am using the same 000webhost.com
I am using the below method and it works fine
<?PHP
mysql_connect("mysql123.000webhost.com", "a701646_dbusrname", "pass") or die(mysql_error());
echo "Connection to the server was successful!
";
mysql_select_db("a701646_dbname") or die(mysql_error());
echo "Database was selected!
";
$result = mysql_query("CREATE TABLE `users` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(100) DEFAULT NULL,
`city` VARCHAR(100) DEFAULT NULL,
`web` VARCHAR(100) DEFAULT NULL,
`age` SMALLINT(6) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=INNODB DEFAULT CHARSET=latin1");
echo $result;
?>