MySQL Forums
Forum List  »  PHP

Can't connect to MYSQL server on ... (13)
Posted by: kenneth watanabe
Date: February 07, 2017 11:56AM

When I run my PHP script, I get the following error:
Can't connect to MYSQL server on ... (13)

Below is the PHP code:
<?php
$hostnameGS = "170.140.xxx.xxx";
$databaseGS = "tfbs_db";
$usernameGS = "kawatan";
$passwordGS = "xxxxxx";
$connGS = mysqli_connect($hostnameGS, $usernameGS, $passwordGS,$databaseGS) or trigger_error(mysql_error(),E_USER_ERROR);

$sql_cmd = "select matrix_id,matrix_count from matrix_counts where matrix_id = 'V$ZNF100_01'";
$sql = mysqli_query($connGS,$sql_cmd) or die(mysql_error());
$row = mysqli_fetch_assoc($sql);
?>

The PHP script is running on a different server than the database.
I tried turning off SELINUX on the database server but it did not help.

Any help would be appreciated.
Ken

Options: ReplyQuote


Subject
Written By
Posted
Can't connect to MYSQL server on ... (13)
February 07, 2017 11:56AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.