请李明老师帮助看一下,谢谢
我在虚拟机里装了一个CentOS 6.0系统,装上了mysql 5.1, php 5.3.2, apache2.2
现在出现一个问题以下代码
<?php
$con=mysql_connect('192.168.1.114','root','123456');
if()
{die('Could not connect:'.mysql_error());
}else{
echo"连接成功";
}
?>
在CentOS系统里,用apache跑,就是 连不上数据库,
192.168.1.114 这个代码在2003里,也是apache可以连上。
在CentOS里,就是连不上数据库,郁闷,,把192.168.1.112改成 localhost 就可以连上了。用IP就是连不上。把ip 改为127.0.0.1也连不上,只有localhost能连上。
库表
=700) window.open('http://bbs.lampbrother.net/attachment/Mon_1109/128_56417_725dada8aa4ba2b.jpg');" onload="if(this.offsetWidth>'700')this.width='700';if(this.offsetHeight>'700')this.height='700';" >
现在出现一个问题以下代码
<?php
$con=mysql_connect('192.168.1.114','root','123456');
if()
{die('Could not connect:'.mysql_error());
}else{
echo"连接成功";
}
?>
在CentOS系统里,用apache跑,就是 连不上数据库,
192.168.1.114 这个代码在2003里,也是apache可以连上。
在CentOS里,就是连不上数据库,郁闷,,把192.168.1.112改成 localhost 就可以连上了。用IP就是连不上。把ip 改为127.0.0.1也连不上,只有localhost能连上。
库表
=700) window.open('http://bbs.lampbrother.net/attachment/Mon_1109/128_56417_725dada8aa4ba2b.jpg');" onload="if(this.offsetWidth>'700')this.width='700';if(this.offsetHeight>'700')this.height='700';" >
作者: wangfei123 发布时间: 2011-09-21
给mysql用户开放远程的主机权限试试
作者: 海峰 发布时间: 2011-09-22
已经开了。
用windows 连linux里的mysql可以连上
用windows 连linux里的mysql可以连上
作者: wangfei123 发布时间: 2011-09-22