【发布时间】:2015-02-23 07:34:33
【问题描述】:
我在 MAC 上的 localhost 端口 7474 上运行 neo4j,我想从服务器 http://www.example.com/test/ 访问它
我该怎么做?我尝试在服务器上的 cpanel 中的远程 mysql 上添加 IP,但它不起作用。我应该在 MAC 上做/添加任何其他设置吗?
php代码:
<?php
// connect
$cs = mysql_connect ( '123.123.123.123:7474', '', '' ) or die ( 'Can not connect to server' );
?>
错误:
PHP Warning: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to MySQL server on '123.123.123.123' on line 4
还有:
$link = mysqli_connect("123.123.123.123:7474","","","") or die("Error " . mysqli_error($link));
错误:
Unknown MySQL server host
mysqli_error() expects parameter 1 to be mysqli, boolean given
【问题讨论】:
标签: php mysql neo4j cpanel remote-server