I have this server running LightHTTPD. I am trying access MySQL/PHPMyAdmin on this server. So far i have googled too much and tried so many things. I did this recently, edited this file /etc/mysql/my.conf
, add bind-address = ip of my server;
, then i did this:
mysql -u root -p
mysql> GRANT ALL ON databasename.* TO root@'0.0.0.0' IDENTIFIED BY 'pasword';
Now when i tried to connect to that server from IP i have granted, it gives me this error:
ini_set('display_errors',1);
error_reporting(E_ALL);
define("DB_NAME","pun_update");
define("DB_USER","root");
define("DB_PASS","");
define ("DB_SERVER","ip of my server");
function connect()
{
$db_handle = mysql_connect(DB_SERVER,DB_USER,DB_PASS)
or die("Unable to Connect to Database check your settings");
mysql_select_db(DB_NAME,$db_handle) or die ("Database doesnot exist");
}
connect();
I get this errror:
Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 110