access to database

This is a discussion on access to database within the MySQL Database forums, part of the Database Forums category; hi to everybody. i'm a newbie in the world of mysql and i've got a problem with the ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-11-2005
francesco
 
Posts: n/a
Default access to database

hi to everybody.
i'm a newbie in the world of mysql and i've got a problem with the
access to a database.
i created a user 'default', from host %, with his password and give him
access to a database (all privileges, with grant option).
when i try to access it from an application i get an exception (access
denied for user 'default'@'localhost').
i can access the database only by user root.

thenk you for your help
Francesco


--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
Reply With Quote
  #2 (permalink)  
Old 10-11-2005
Axel Schwenke
 
Posts: n/a
Default Re: access to database

francesco wrote:

> i created a user 'default', from host %, with his password and give him
> access to a database (all privileges, with grant option).
> when i try to access it from an application i get an exception (access
> denied for user 'default'@'localhost').


The MySQL privilege system clearly distincts between 'local' connections
and 'network' connections. A '%' in the host column matches all network
connections but *not* local connections. If you want to connect from
both localhost and via the network you have to GRANT privileges twice.
One time for '%', one time for 'localhost'.

However I discourage from using '%' in the host column. In most cases a
network name or IP address range is more appropriate.

XL
Reply With Quote
  #3 (permalink)  
Old 10-12-2005
Fra
 
Posts: n/a
Default Re: access to database

thank you: now it works (and i'll avoid using '%')
Francesco



--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
Reply With Quote
Reply


Thread Tools
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:24 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0