Hi,
I have a trouble with the remote connection on mysql db.
On my pc all runs correcty, but when I put my stuff on the server there is some kind of error.
I have to create all: the database, the users permissions, and the db permissions.
So I think I do some mistakes in permissions.
This is the connection php script (on my pc it work correcly).
$server_name="localhost";
$usr_name="userName";
$usr_pwd="userPwd";
$database_name="dbName;
$connection=mysql_connect($server_name,
$usr_name,$usr_pwd)
or die ("Mysql error: " .mysql_error() );
$DB=mysql_select_db($database_name,$conn
essione)
or die ("Mysql error: " .mysql_error() );
I have already tryed to change "localhost" with:
$server_name="myDomain.com";
either
$server_name="IPaddress";
either
$server_name="www.myDomain.com";
and I have always an error.
This is my error:
Warning: Access denied for user: 'userName@localhost' (Using password: YES) in /usr/local/etc/httpd/htdocs/ mioSito/admin/include/db/connection.php on line 9
Warning: MySQL Connection Failed: Access denied for user: 'userName@localhost' (Using password: YES) in / usr/local/etc/httpd/htdocs/columbus/admin/include/db/connection.php on line 9
Mysql error: Access denied for user: 'userName@localhost' (Using password: YES)
(either: userName@myDomain.com)
These are the user privileges ("user" table in "mysql" database):
Host %
User userName
Password userPwd
Select_priv Y
Insert_priv Y
Update_priv Y
Delete_priv Y
Create_priv N
Drop_priv N
Reload_priv N
Shutdown_priv N
Process_priv N
File_priv N
Grant_priv N
References_priv N
Index_priv N
Alter_priv N
And these are my database privileges ("db" table in "mysql" database):
Host %
Db dbName
User userName
Select_priv Y
Insert_priv Y
Update_priv Y
Delete_priv Y
Create_priv N
Drop_priv N
Grant_priv N
References_priv N
Index_priv N
Alter_priv N
the others tables are empties.
What can I do?
Please Help me.
I have already tryed with
FLUSH PRIVILEGES
Thank you,
saintex