I'm trying to connect to mysql using the personal webpage on Mac OSX. However, I keep having issues when i do the command...
It says my computer name is
spiderman, and that local networks can access it at
My ip address is along the lines of http://18.104.22.168/~crystalchan/
I have PHP, MySQL, and Apache enabled on my Mac. When I try the sql command from a php file, it keeps saying
Could not connect. Host '22.214.171.124' is not allowed to connect to this MySQL server
For the arguments for the mysql_connect function, I've tried using my ip address, spiderman.local and none of them work. Any help would greatly be appreciated.
The error comes from my line of code
mysql_connect($this->host,$this->username,$this->password) or die("Could not connect. " . mysql_error());
There is no set username or password created so I don't think they matter.