Hi,
I have already used Kevin Yank's book to set up 2 small database driven sites, but now I've come across a problem with a new client who is using netnation.com to host her site.
They setup the access to the MySQL database and gave us the same database name as the username (firefit).
To start the MySQL database from the command line, I must be logged into the account with ssh and do the following:
export MYSQL_HOST=db.netnation.com
export MYSQL_TCP_PORT=4000
export MYSQL_PASSWD='mypass'
then I can start the database with:
/usr/local/mysql/bin/mysql -u firefit -p firefit
OR, if I don't export the variables, I can start it directly with:
/usr/local/mysql/bin/mysql -h db.netnation.com -P 4000 -u firefit -p firefit
My problem now is that I can't connect to the MySQL server directly - I can only connect directly to the database.
So when I have the code:
$dbcnx =
@mysql_connect("db.netnation.com", "firefit", "password");
if (!$dbcnx)
{ echo("no connection made");
exit;
}
else
{ echo("we made it!");
exit;
}
I always get the "no connection made".
I have also tried with "localhost" and with "127.0.0.1" and still nothing.
Is there a way to make a direct connection to the database, not just the MySQL server? Is there a way around this?
I have contacted netnation, but they have not been very helpful so far.
Thanks!
Christine.



.

Bookmarks