Forum Moderators: coopster
Here is the error:
Warning: mysql_connect(): Host 'localhost' is not allowed to connect to this MySQL server in c:\web\test_mysql.php on line 20
1130: Host 'localhost' is not allowed to connect to this MySQL server
the line 20 in question is just this:
$connection = mysql_connect($host,$username,$password);
I have been using the instructions I found here:
h**p://internetmaster.com/installtutorial/configure_mysql.htm
Are you familiar with this error message? How to I get rid of it?
If I told you how easy it was to spoof an IP address you would probably need a new pair of pants. Often times people don't make security considerations for 127.0.0.1 because they assume that the only way someone could access the server from that IP was if they were sitting AT the server - in which case they would be logged on as a user who had permission to do whatever they were doing, etc. That mentality is what causes people who THINK their systems are secure to get hacked time and time again. All I have to do is modify my outbound packets so the originating IP address is 127.0.0.1. I won't get a REPLY from your server, but if I know what is there and what I'm supposed to expect I can figure out what information to SEND to you with that spoofed IP address to either do what I want or give another IP address (my real IP) access to what I want and then remove it later.
It will also be COMPLETELY untraceable unless you were able to catch me in the act via a combined effort of every ISP that is used to facilitate the connection between my system and yours. I would be long gone by the time that happened.
I haven't seen that error message, but when I set up Apache, mySQL, and PHP on my local box for testing I had to do some work on my firewall to connect to local host. It wouldn't connect otherwise.
I was using Norton Internet Security 2003.
Try disabling your firewall and connecting. If it works you know you'll have to see if you can configure your firewall, if not, you might need to look at how Apache, MySQL, and PHP are configured.
(The production/live servers are in Texas, and they are quite secure)
I just re-installed MySQL and have been hesitantly following the steps given at the tutorial (link above). Right now I can access mysql at the command line, and when I invoke my test PHP script, I get a different error:
Warning: mysql_connect(): Access denied for user: 'root@localhost' (Using password: YES) in c:\web\test_mysql.php on line 20
1045: Access denied for user: 'root@localhost' (Using password: YES)
I do suspect this is a Firewall problem. Does anyone know how to config the firewall that comes with WinXP?
I use PHPDev, you can get it at [firepages.com.au...]
It's free and will save a lot of time and frustration. There is another called "Triad". I have never used that one, but I have read several good reviews for that one, too.
Again, if you are interested in the minutiae involved with the Apache, mySQL, and PHP installation, then you are on the right track. But if all you want to do is run this stuff for testing, you might want to try PHPDev. If nothing else, it will give you more understanding so you can install them individually later if you are still interested in doing so.