$myconn=mysql_connect("192.168.1.xxx""root""123456");如何连不上数据库啊

WBOY
Release: 2016-06-13 13:40:42
Original
1186 people have browsed it

$myconn=mysql_connect("192.168.1.xxx","root","123456");怎么连不上数据库啊?
$myconn=mysql_connect( "192.168.1.xxx ", "root ", "123456 ");怎么连不上数据库啊?

提示:

Host   'st '   is   not   allowed   to   connect   to   this   MySQL   server   in   ......

------解决方案--------------------
192.168.1.xxx是本地mysql还是远程的?
------解决方案--------------------
可以用MYSQL客户端试一下:
> mysql -uroot -p123456
------解决方案--------------------
看看你的数据库所在的192.168.1.xxx的root用户中又没有又远程连接的权限

然后看看防火墙有端口打开没有
------解决方案--------------------
本地的就用localhost吧
$myconn=mysql_connect( "localhost ", "root ", "123456 ");
------解决方案--------------------
看看端口吧

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template