> 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