Lost connection to MySQL server during query

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Lost connection to MySQL server during query

Postby latheesan » 10. August 2006 00:08

Im running the latest version of xampp on my windows xp SP2 server, but im getting the following error:

mysql_connect(): Lost connection to MySQL server during query

when my website tries to connect to it remotely. e.g.

mywebsite.com/test.php (website hosted on linux server)

Code: Select all
mysql_connect("home_pc.no-ip.com", "root", "123456");
mysql_select_db("test_db");


so when i run test.php, i get that error.... How can i fix this??? This problem is already discussed at webhostingtalk.com - http://webhostingtalk.com/showthread.php?t=537508 (still no luck, plz help)
latheesan
 
Posts: 6
Joined: 16. June 2005 19:11

Postby Wiedmann » 10. August 2006 00:18

Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby latheesan » 10. August 2006 01:17

i tried the suggestion, especially "ping", i get the result "MySQL is Alive"

so, why isnt it still working???
latheesan
 
Posts: 6
Joined: 16. June 2005 19:11

Postby Wiedmann » 10. August 2006 01:29

i tried the suggestion, especially "ping", i get the result "MySQL is Alive"

I hope, you have executed this command on the Linux box?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby latheesan » 10. August 2006 02:32

no i executed that ping command on my windows box on cmd.exe

CD C:\WWW\xampp\mysql\bin
mysqladmin user==root pass==123456 ping

result = mysql is alive
latheesan
 
Posts: 6
Joined: 16. June 2005 19:11

Postby Wiedmann » 10. August 2006 02:48

no i executed that ping command on my windows box on cmd.exe

That does not make a sense ;-)

Your problem is not the connection from pc1 (Windows) to pc1 (Windows). It's the connection from pc2 (Linux) to pc1 (Windows).
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby WorldDrknss » 10. August 2006 10:16

first off did you allow mysql to accept remote connection.
You can do this by logging into phpmyadmin -> Privileges -> Edit Privileges -> scroll down to Login Information and change Host: to Any host and then click on go, or you can select use text field: and enter a host name in, then click on go.
http://wdguides.org - XAMPP Tutorials & MORE!!!!
User avatar
WorldDrknss
 
Posts: 292
Joined: 17. September 2005 13:40

Postby latheesan » 10. August 2006 13:43

Thanks allot for your reply.

I logged in phpmyadmin and did the privilages first:

Image

Now, i went to my script, still no luck... Do i have to remove the pma and localhost users, leaving only my pc.no-ip.com account there and restart the server?

Take a look at my process list:

Image

Is there something on it that shouln't be there???
latheesan
 
Posts: 6
Joined: 16. June 2005 19:11


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 47 guests