|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
no permission?
Hi!
I recently installed a win-apache-mysql-php box. everything works perfect. exept: If I try to connect to a db from a dynamic php website on the same server (localhost) I get: >No Permission for user@localhost (using Pass: NO)< I setup users for example: host:%/user:tom/pass:secret/ with all rights I can even connect to my mysql-server from diff win-mysql-admin-clients with diff users, from any machine how can it be that I can connect from command-line but not from php? I really don't know what to do, I tried almost everything already. thank you in advance |
|
#2
|
|||
|
|||
|
Re: no permission?
Quote:
I believe mysql treats connections from the localhost seperately, because ostensibly, you would have a "superuser" connect from there. So you must create a seperate user entry like: host:localhost/user:tom/pass:secret as well as the user you have with "%" to allow tom to connect from any host PLUS the localhost. |
|
#3
|
|||
|
|||
|
More info
A little more digging (slow day for me) and I turned up some more info.
When the mysql server starts up, it reads the user table, sorted by host first, username second. Wild card entries are listed after fully qualified entries. Given that the user entry you intend to connect with uses "%" for the host, it would fall at the end of the sorting order. Looking at your user table, can you find a more fully qualified entry that may be used in place of "%" when trying to connect from the localhost? If so, do the passwords match on these entries? Also, notice if there is a more specific host entry, is a password required at all? If not, the logon will be unsuccessful because "no password" != "anypassword". The key entries to look for, may be the default anonymous entries that require no user name, and no password. Most sources I've read encourage deleting these users from the table. |
![]() |
| Viewing: Dev Articles Community Forums > Databases > General SQL Development > no permission? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|