Professional Web Applications Themes

access to database - MySQL

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 - [url]http://www.Mailgate.ORG[/url]...

  1. #1

    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 - [url]http://www.Mailgate.ORG[/url]
    francesco Guest

  2. #2

    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
    Axel Schwenke Guest

  3. #3

    Default Re: access to database

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



    --
    Posted via Mailgate.ORG Server - [url]http://www.Mailgate.ORG[/url]
    Fra Guest

Similar Threads

  1. database access
    By pearl_honey in forum Coldfusion Database Access
    Replies: 6
    Last Post: June 2nd, 10:17 PM
  2. Access Database
    By Paul and Mike in forum Macromedia Director Lingo
    Replies: 8
    Last Post: May 21st, 06:16 PM
  3. .NET Database access
    By acidrain9 in forum Dreamweaver AppDev
    Replies: 0
    Last Post: February 16th, 09:24 PM
  4. Write Access to Access DataBase
    By Microsoft in forum ASP.NET Security
    Replies: 0
    Last Post: August 14th, 07:56 PM
  5. Access vs DBF database??
    By Mad Dog in forum Macromedia Dreamweaver
    Replies: 0
    Last Post: July 28th, 04:41 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139