Jump to content

mySQL Connection Problem


davidmuir

Recommended Posts

Hello,

 

I recently setup mySQL and PHP on my Windows Small Business Server 2003 Server at my company. I have been wanting to write some php scripts to interact with a database on the server but have been unable to connect to the database via PHP. A simple connect function:

 

mysql_connect("localhost","root","*******");

 

Yields the error:

Can't connect to MySQL server on 'localhost' (10061)

 

The strange thing is, that I was able to connect with phpmyadmin just fine in "config" mode. Where it makes you enter your username and password.

 

Also I can easily connect via the command line on the server through the command mysql -u root -p.

 

I have read that this could possibly be a port issue of some sort. But when I do a phpinfo() on the server it says that the default port is 3306. There is no firewall running on the server. Please let me know if you need any more information.

 

I would appreciate any help greatly as I have been working on this problem for several days now.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.