A user in MySql is not just a username, but a username and a host.

The host of '%' denotes all hosts accept 'localhost'.

Therefore you usually require two entries for each user:

CREATE USER ben@'%' INDENTIFIED BY 'ben';
CREATE USER ben@'localhost' INDENTIFIED BY 'ben';

Does this help?

Ben


Pam Astor wrote:
connectiong from shell means connecting as localhost by default, connecting from PHP can be some different server and/or PHP uses the full IP address/hostname of the server

check/compare the privileges for your users for 'localhost' and '%'



I ran “SELECT * from mysql.user;” the command generated a
list.  For root it showed in the host
column local host, the second row for root showed the name of the web server
the mysql install is on.  The third and
fourth rows showed no users, however the third and fourth rows showed in the
host columns localhost and the server name, respectively.



 The fifth and sixth lines showed the first non root user I created
and for this user it showed in the host Colum the % character, and the other
line for this user showed localhost as the host.



 The seventh line shows the second non root user I created –
it has just one line and shows localhost as the host.  All the rest of the 
users I created show the
% character in the host column.


 No IP addresses are listed anywhere.



_________________________________________________________________
More immediate than e-mail? Get instant access with Windows Live Messenger.
http://www.windowslive.com/messenger/overview.html?ocid=TXT_TAGLM_WL_Refresh_instantaccess_042008

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to