Cant get php script to connect to asterisk internal mysql database

Posted by Bilbo on Super User See other posts from Super User or by Bilbo
Published on 2014-08-24T02:20:51Z Indexed on 2014/08/24 4:23 UTC
Read the original article Hit count: 502

Filed under:
|
|
|

Im trying to get a PHP script to connect to Asterisks internal sql database.

I tried the to use the standard method for example

$con = mysqli_connect("192.168.1.126","root","mysql","asterisk");

However when I log into the asterisk server to access the mysql database all i need it to type "mysql" and im logged in.

Im wondering is it possible for my php script to connect to asterisk internal database.

//edit The following mysql error is shown

Warning: mysqli_connect(): (HY000/2003): Can't connect to MySQL server on '192.168.1.126' (111) in /var/www/html/project/sipSubScript.php on line 6 Failed to connect to MySQL: Can't connect to MySQL server on '192.168.1.126' (111)

© Super User or respective owner

Related posts about php

Related posts about mysql