I'm trying to connect to mysql using the personal webpage on Mac OSX. However, I keep having issues when i do the command...
mysql_connect
It says my computer name is spiderman, and that local networks can access it at spiderman.local
My ip address is along the lines of http://194.111.1.111/~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 '194.111.1.111' 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.