发布网友
共1个回答
热心网友
这个遇到过,是因为你的mysql没有开启ip访问权限。
解决方案:
1。授权法:
use
mysql;
grant
all
privileges
on
*.*
to
leo@'%'
identified
by
"leo";
以leo用户在任何地方都可以访问;
2。改表法:
可以实现以root用户在任何地方访问数据库
update
user
set
host
=
'%'
where
user
=
'root';
这样就可以了