General SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesGeneral SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
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  
Old January 8th, 2003, 07:22 AM
floeb floeb is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: Vienna
Posts: 1 floeb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old January 8th, 2003, 08:51 AM
clikker1 clikker1 is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 2 clikker1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Re: no permission?

Quote:
Originally posted by floeb

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?

[/B]


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.

Reply With Quote
  #3  
Old January 8th, 2003, 12:50 PM
clikker1 clikker1 is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 2 clikker1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesGeneral SQL Development > no permission?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway