global $host, $username, $password, $database;
$host = "meshtelecom.com";
$username = "mesh_project";
$password = "password";
$database = "mesh_database";
$link = mysql_connect($host, $username, $password);
if(!$link)echo "Connection failed.";
$db = mysql_select_db($database)or die(mysql_error());
我在meshtelecom.com 中使用phpmyadmin 创建了一个数据库。我无法从另一台服务器访问此数据库.. 它给了我:
Connection failed.Access denied for user ''@'localhost' to database 'mesh_database'