Professional Web Applications Themes

create view permissions - MySQL

I've read the developers page regarding views on mysql and I've also found that other people have had problems with creating views and permissions but I still have a question as to how I achieve this. I create a database using JDBC in my java program. Everything works fine (creating tables) but when it gets to creating the view I am told that I don't have enough permissions. This is doing it as normal user. For usability reasons I would like to be able to do this as normal user, is it possible? thanks Lionel....

  1. #1

    Default create view permissions

    I've read the developers page regarding views on mysql and I've also
    found that other people have had problems with creating views and
    permissions but I still have a question as to how I achieve this.

    I create a database using JDBC in my java program. Everything works fine
    (creating tables) but when it gets to creating the view I am told that I
    don't have enough permissions. This is doing it as normal user.

    For usability reasons I would like to be able to do this as normal user,
    is it possible?

    thanks

    Lionel.
    Lionel Guest

  2. #2

    Default Re: create view permissions

    Lionel wrote: 

    http://dev.mysql.com/doc/refman/5.1/en/create-view.html

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

  3. #3

    Default Re: create view permissions


    Jerry Stuckle wrote: 
    >
    > http://dev.mysql.com/doc/refman/5.1/en/create-view.html[/ref]

    I've already read this link. It suggests that the default user account
    should be able to create a view but with a default install and under
    table mysql.db the value in the Create_view_priv column for each of the
    two rows is "N". I'm guessing this means that a normal user under their
    own user account can't create views which seems ridiculous if they can
    create tables.

    It would be easy enough to change this but I'm also trying to install
    mysql silently with my application and it is not expected that I will
    be able to change this.

    So if anyone has experience can you suggest a possible solution?

    thanks

    Lionel.

    lionelv@gmail.com Guest

  4. #4

    Default Re: create view permissions


    Jerry Stuckle wrote: 
    >
    > http://dev.mysql.com/doc/refman/5.1/en/create-view.html[/ref]

    I've already read this link. It suggests that the default user account
    should be able to create a view but with a default install and under
    table mysql.db the value in the Create_view_priv column for each of the
    two rows is "N". I'm guessing this means that a normal user under their
    own user account can't create views which seems ridiculous if they can
    create tables.

    It would be easy enough to change this but I'm also trying to install
    mysql silently with my application and it is not expected that I will
    be able to change this.

    So if anyone has experience can you suggest a possible solution?

    thanks

    Lionel.

    lionelv@gmail.com Guest

  5. #5

    Default Re: create view permissions


    Jerry Stuckle wrote: 
    >
    > http://dev.mysql.com/doc/refman/5.1/en/create-view.html[/ref]

    I've already read this link. It suggests that the default user account
    should be able to create a view but with a default install and under
    table mysql.db the value in the Create_view_priv column for each of the
    two rows is "N". I'm guessing this means that a normal user under their
    own user account can't create views which seems ridiculous if they can
    create tables.

    It would be easy enough to change this but I'm also trying to install
    mysql silently with my application and it is not expected that I will
    be able to change this.

    So if anyone has experience can you suggest a possible solution?

    thanks

    Lionel.

    lionelv@gmail.com Guest

  6. #6

    Default Re: create view permissions

    com wrote: 
    >>
    >>http://dev.mysql.com/doc/refman/5.1/en/create-view.html[/ref]
    >
    >
    > I've already read this link. It suggests that the default user account
    > should be able to create a view but with a default install and under
    > table mysql.db the value in the Create_view_priv column for each of the
    > two rows is "N". I'm guessing this means that a normal user under their
    > own user account can't create views which seems ridiculous if they can
    > create tables.
    >[/ref]

    I don't read that at all. The MySQL root account has all privileges,
    but others don't unless specifically granted.

    I don't argue whether it makes sense or not. Just point out it is a
    completely separate privilege.
     

    The root user should have the ability to grant privileges to all users.
    When I need this as part of an install script, I ask the installer for
    the root user id/password.
     


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

  7. #7

    Default Re: create view permissions

    Jerry Stuckle wrote: 
    >>
    >>
    >> I've already read this link. It suggests that the default user account
    >> should be able to create a view but with a default install and under
    >> table mysql.db the value in the Create_view_priv column for each of the
    >> two rows is "N". I'm guessing this means that a normal user under their
    >> own user account can't create views which seems ridiculous if they can
    >> create tables.
    >>[/ref]
    >
    > I don't read that at all. The MySQL root account has all privileges,
    > but others don't unless specifically granted.[/ref]

    I guess you are right. I interpreted the following as indicating that
    the user has the right privileges, but on re-reading it for the fourth
    time it doesn't actually explicitly say that, I thought it was inferred:

    "If you do not have the SUPER privilege, the only legal user value is
    your own account, either specified literally or by using CURRENT_USER.
    You cannot set the definer to some other account."
     

    Ok. Looks like I will do the same thing.

    Thanks

    Lionel.
    Lionel Guest

Similar Threads

  1. How to create a forum thread view ?
    By Victor BX in forum Macromedia ColdFusion
    Replies: 4
    Last Post: May 19th, 02:36 PM
  2. AS400 Logical Files compared to CREATE VIEW
    By Darius in forum IBM DB2
    Replies: 1
    Last Post: August 7th, 04:32 PM
  3. Create a View from a Stored Procedure
    By Stomper in forum Microsoft SQL / MS SQL Server
    Replies: 2
    Last Post: July 16th, 05:21 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