Professional Web Applications Themes

Not CREATE DATABASE... - MySQL

Can I allow a user to CREATE TABLEs, but not CREATE DATABASEs? -- Dennis K....

  1. #1

    Default Not CREATE DATABASE...

    Can I allow a user to CREATE TABLEs, but not CREATE DATABASEs?

    --

    Dennis K.
    Dennis Guest

  2. #2

    Default Re: Not CREATE DATABASE...

    Dennis K. wrote: 

    Apparently not, according to the following excerpt:

    "The CREATE and DROP privileges allow you to create new databases and
    tables, or to drop (remove) existing databases and tables."
    (http://dev.mysql.com/doc/refman/5.0/en/privileges-provided.html)

    There does not seem to be a distinct SQL privilege for create table
    versus create database.

    You probably can't enforce it with filesystem-level permissions either,
    since the uid of the mysqld process must have write permission to the
    data directory.

    I don't know any other solution to this requirement.

    Regards,
    Bill K.
    Bill Guest

  3. #3

    Default Re: Not CREATE DATABASE...

    In article <newsguy.com>, Bill Karwin says... 
    >
    > Apparently not, according to the following excerpt:
    >
    > "The CREATE and DROP privileges allow you to create new databases and
    > tables, or to drop (remove) existing databases and tables."
    > (http://dev.mysql.com/doc/refman/5.0/en/privileges-provided.html)
    >
    > There does not seem to be a distinct SQL privilege for create table
    > versus create database.
    >
    > You probably can't enforce it with filesystem-level permissions either,
    > since the uid of the mysqld process must have write permission to the
    > data directory.
    >
    > I don't know any other solution to this requirement.[/ref]

    Well, a create permission on a single database would obviously only
    allow table creation. But I don't think that's what the OP is looking
    for.
    --
    PleegWat
    Remove caps to reply
    PleegWat Guest

  4. #4

    Default Re: Not CREATE DATABASE...

    On Sun, 1 Oct 2006 19:31:23 +0200, PleegWat
    <leegwater-68.demon.nl.INVALID> wrote:
     
    >>
    >> Apparently not, according to the following excerpt:
    >>
    >> "The CREATE and DROP privileges allow you to create new databases and
    >> tables, or to drop (remove) existing databases and tables."
    >> (http://dev.mysql.com/doc/refman/5.0/en/privileges-provided.html)
    >>
    >> There does not seem to be a distinct SQL privilege for create table
    >> versus create database.
    >>
    >> You probably can't enforce it with filesystem-level permissions either,
    >> since the uid of the mysqld process must have write permission to the
    >> data directory.
    >>
    >> I don't know any other solution to this requirement.[/ref]
    >
    >Well, a create permission on a single database would obviously only
    >allow table creation. But I don't think that's what the OP is looking
    >for.[/ref]

    When I go into phpMyAdmin on my ISP the home page says "Create new
    database: No Privileges", and I am restricted to only creating tables in
    the database that my ISP set up for me. I was just wondering how they
    did this.

    Maybe I should look at the phpMyAdmin code. I was hoping there was a
    simple answer.

    --

    Dennis K.
    Dennis Guest

  5. #5

    Default Re: Not CREATE DATABASE...

    Dennis K. wrote: 
    >>
    >>Well, a create permission on a single database would obviously only
    >>allow table creation. But I don't think that's what the OP is looking
    >>for.[/ref]
    >
    >
    > When I go into phpMyAdmin on my ISP the home page says "Create new
    > database: No Privileges", and I am restricted to only creating tables in
    > the database that my ISP set up for me. I was just wondering how they
    > did this.
    >
    > Maybe I should look at the phpMyAdmin code. I was hoping there was a
    > simple answer.
    >[/ref]

    Remove the CREATE privilege from the user, and only allow CREATE
    privilege within the database(s).

    --
    ==================
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    net
    ==================
    Jerry Guest

  6. #6

    Default Re: Not CREATE DATABASE...

    On Sun, 01 Oct 2006 15:38:01 -0400, Jerry Stuckle
    <net> wrote:
     
    >>
    >>
    >> When I go into phpMyAdmin on my ISP the home page says "Create new
    >> database: No Privileges", and I am restricted to only creating tables in
    >> the database that my ISP set up for me. I was just wondering how they
    >> did this.
    >>
    >> Maybe I should look at the phpMyAdmin code. I was hoping there was a
    >> simple answer.
    >>[/ref]
    >
    >Remove the CREATE privilege from the user, and only allow CREATE
    >privilege within the database(s).[/ref]

    That seems to be what their doing. No global privileges ... just
    privileges within that one db.

    Thanks,

    --

    Dennis K.
    Dennis Guest

Similar Threads

  1. Create Database
    By lh83 in forum Coldfusion Database Access
    Replies: 0
    Last Post: February 8th, 08:15 AM
  2. DB2 v7.1 create Database via SQL?
    By Moritz in forum IBM DB2
    Replies: 9
    Last Post: October 17th, 07:52 AM
  3. Create a Report from a Database
    By cavagnaro in forum Macromedia Dreamweaver
    Replies: 1
    Last Post: July 10th, 12:12 AM
  4. Create 9.2.0 database manually
    By santosh in forum Oracle Server
    Replies: 4
    Last Post: January 6th, 03:20 PM

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