Page 1 of 1

Newbee - Error on Mysql_connect

PostPosted: 05. July 2013 03:16
by Jaykappy
I have this website running on my computer at work....everything works fine...
I just installed XAMPP and activated the Apache and MySQL db
I set a password for MySQL and gave it a password...this is the same password that I am using to connect to mySQL
I imported the tables needed for the web site I am testing with.

The index page calls this init.php page

* I am getting these errors: WHY IS my machine actively refusing it? how do I fix this? Is this a setting in XAMPP?
* I am NOT getting to the echos I am testing for in the 2nd connection attempt

ERRORS:
Warning: mysql_connect(): No connection could be made because the target machine actively refused it. in C:\xampp\htdocs\VisualUpload\init.php on line 8

Warning: mysql_connect(): No connection could be made because the target machine actively refused it. in C:\xampp\htdocs\VisualUpload\init.php on line 13
Please try later.


CODE:

<?php

// Start headers and sessions
ob_start();
session_start();

// MySQL Connection
mysql_connect("127.0.0.1:3600", "Jason", "Passw0rd");
mysql_select_db("visualupload");


$mysqlConnection = mysql_connect("127.0.0.1:3600", "Jason", "Passw0rd");
if (!$mysqlConnection)
{
echo "Please try later.";
}
else
{
echo "connected";
}

// Include func files
include("func/album.func.php");
include("func/image.func.php");
include("func/user.func.php");
include("func/thumb.func.php");

?>

Re: Newbee - Error on Mysql_connect

PostPosted: 05. July 2013 03:31
by JJ_Tagy
Did you change your listen port from 3306 to 3600?

Re: Newbee - Error on Mysql_connect

PostPosted: 05. July 2013 03:43
by Jaykappy
Bang...thats weird....dont know why that changed....maybe my mqsql port is 3600 on my computer at work...
either way its all fixed....THANKS.....cheers