connect to mysql database using php on different port -
my connection string is:
$connection = mysql_connect("localhost", "root", "") or die("could not connect db: ".mysql_error());
but on computer have installed iis server first localhost:80 reserved changed port 8080 changing httpd.conf file in apache folder.
now should change in connection string connect database. using xampp .
should tried writing these: 1:
$connection = mysql_connect("localhost:8080", "root", "") or die("could not connect db: ".mysql_error());
2:
$connection = mysql_connect("localhost,8080", "root", "") or die("could not connect db: ".mysql_error());
but not working please. thank you
default port number mysql server uses 3306 web servers default port 80
web server , mysql server independent.
do not change api connect mysql
Comments
Post a Comment