views:

35

answers:

2

I'm trying to add a new user to a mysql database. The original state of the file looks like this (which works):

$dconex=mysql_connect("200.xxx.xxx.xxx","abong1","XXXXXX");
mysql_select_db("abong1",$dconex);

I'm trying to add this line in between the mysql_select_db:

$dconex=mysql_connect("200.xxx.xxx.xxx","abong1_abongler","XXXXXXXX");

I configured the user in PhpMyAdmin with the correct IP, username, and password, but it doesn't seem to work. Is it something about the username? should it have a 'root' like "abong1.abong1_abongler" ?

Thanks in advance.

+1  A: 

You may need to run

flush privileges;
sberry2A
If it is done using phpMyAdmin's privileges section, that's not required. So this wouldn't be the problem.
thomasrutter
A: 

What error are you getting, specifically? Permission denied? Can't connect? Change your connection line to the following:

$dconex=mysql_connect("200.xxx.xxx.xxx","abong1_abongler","XXXXXXXX") or die(mysql_error());

and see what error gets spit out. If it's permission denied, then your user isn't configured properly (could be username, hostname, or password is incorrect). Connection refused would be MySQL not allow connections over TCP.

Marc B