"localhost" is simply the loopback adapter and refers to the same
machine the application is running on. This generally equates to IP
address 127.0.0.1. If you're accessing TCP/IP resources on the same
machine the application is running on, you normally use "loopback" or
"127.0.0.1".
The other IP address (whether static or dynamic) is required to access
TCP/IP resources from outside of this machine.
> In the priviledges section of phpmyadmin, I have added the host IP
> number and password
> as root because server is running on root and I just want to get it to
> work on the outside ip first and then
> run it as mysql user. When I try to connect below I get the error
> cannot connect. I just want to connect to database. I do not know
> why it is saying
css-discuss.org on this usenet group. I corrected it
> once.
> thanks,
>
> $dbname= "taskos";
> $link = mysql_connect('XX.XX.XX.XX:3306', 'root', 'xxxx');
> mysql_select_db($dbname);
>
> if ( !mysql_select_db($dbname,$link) ) {
> echo 'Could not select database taskos<br>';
> exit;}else{echo "connected to taskos!";}
Do you need to access MySQL from another machine? In most instances,
the answer is no, and it's better to disable networking in MySQL for
security reasons. (Note that if you're connecting to PHPMyAdmin on the
server then accessing the database, you are accessing MySQL locally from
the application).
Also note that dyndns does NOT give you a static IP address. Only your
ISP can assign IP addresses. What dyndns gives you is a static domain
name which can be equated to your ip address. They are two different
things.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstu...@attglobal.net
==================