Click to See Complete Forum and Search --> : problems connecting to mysql from php


kenneth74
07-15-2003, 04:42 PM
I have installed FoxServ 3.0 on a Windows XP computer.
The computer has two networkcards, where one is 127.0.0.1 and the other one is a public ip.

When I try to login on phpMyAdmin, I can not login with the root username and no password. But if I use root@localhost, and no password I can log in. I then created a new user, with phpMyAdmin, and checked Yes on all access rights. And gave the username a password. If I use the new username to try and login to phpMyAdmin, I do not get in. If I use newusername@localhost, and password, I do not get in either.
But if I use newusername@localhost, and no password I get in.
New username and no password doesn't work either.

WHY????

What have I done wrong?
A friend of mine created a php script for me, and I tried this on my server, but it doesn't work. When we run it on his computer it works. WHY??

What have I done wrong?

I really hope this board can help me!

Best regards
Kenneth

tsinka
07-16-2003, 02:19 AM
Hi,

hard to imagine without knowing the contents of the mysql.user table:

some hints:

1) always use the PASSWORD function on the password field so the password gets encrypted.
2) you also have to add a record to the user table with host containing the real ip address and maybe additionally a record where the host field contains the host name or the host name with the fully qualified domain. Depends a little bit.

How did you set up the host in the config.inc.php of phpMyAdmin ?