I have tried phpMyAdmin and i am able to work on mySQL with it. But still mu code it unable to connect to mySQL.
I am using the following code to connect:
<?php
$link = @mysql_connect('localhost', 'root', 'admin');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
@mysql_select_db('test', $link);
$sql = 'SELECT * FROM employee LIMIT 0, 10 ';
$dataset = @($sql, $connection);
mysql_close($link);
?>