①改表法.可能是你的帐号不允许从远程登陆,只能在localhost.这个时候只要在localhost的那台电脑,登入mysql后,更改
"mysql"
数据库中
"user"
表里的
"host"
字段,把"localhost"改称"%",即可.
mysql
-u
root
-pvmwaremysqluse
mysql;mysqlupdate
user
set
host
=
'%'
where
'root';mysqlselect
host,
from
user;
grant
all
privileges
on
*.*
to
'myuser'@'%'
identified
by
'mypassword'
with
option;
首先要使用SQL Server Driver
部分代码:
$serverName?=?"localhost";?//数据库服务器地址
$uid?=?"sa";?//数据库用户名
$connectionInfo?=?array("UID"=$uid,
"PWD"=$pwd,?"Database"="cart");
$conn?=?sqlsrv_connect(?$serverName,?$connectionInfo);
if(?$conn?==?false)
{
echo?"连接失败!";
die(?print_r(
sqlsrv_errors(),?true));
}
以上就是土嘎嘎小编为大家整理的phpip归属地数据库相关主题介绍,如果您觉得小编更新的文章只要能对粉丝们有用,就是我们最大的鼓励和动力,不要忘记讲本站分享给您身边的朋友哦!!