Jump to content

Lost connection to MySQL server during query


dingus

Recommended Posts

hey i am haveing an issue connecting to a mysql database i get the following error

 

Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server during query in /home/cutencud/public_html/testing.php on line 1

 

now testing.php only has one line and it looks like this

 

<?php mysql_connect("66.97.165.60", "root", "") ?>

 

anyone know what would cause that? (and i removed the password before posting

Link to comment
Share on other sites

ok we didnt learn that much new output is

 

Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server during query in /home/cutencud/public_html/testing.php on line 2

Could not connect: Lost connection to MySQL server during query

 

which dosent realy give us much more infomration but it was a good idea thanks

somthing more interesteing is that the same script works fine localy on the server any ideas?

Link to comment
Share on other sites

the sql server is my own the php file is running from shared hosting.....

 

basicly what i an trying to do is port the database over th the VPS i am useing and point the scripts there at the new database

 

move the files over

 

that way while i wait for dns to update (After changeing it) i have both sites live on one database so there will be no problem

Link to comment
Share on other sites

ok, are you sure the machine that has the sql server is setup to allow connections externally. If you can run the script from the host machine and not from a remote machine it suggests there is a problem with either the firewall or the sql server setting. But i am not sure to be honest. Try google

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.