Check if the user can create temporary?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mr aldo
    New Member
    • Jul 2007
    • 15

    Check if the user can create temporary?

    Hi...

    I am currently working on a search function, and I need to check and see if the current MySQL username has permission to create a temporary table, I have searched MySQL's site to no avail, any help is appreciated.

    Thanks!
  • coolsti
    Contributor
    • Mar 2008
    • 310

    #2
    You can use the "show grants for XXX" where XXX is your user.

    I am not sure what permissions you need to have as user to be able to carry out this command, though.

    If the user has permission to create temporary tables, then it will appear in the outcome of carrying out this query.

    By the way, you didn't carry out your search of the Mysql site very well. I found the above information there.

    I don't like the Mysql site's search for finding things. I came to the above information using a Google search, using the string "mysql create temporary tables" and then after I saw that there was a reference to the "show grants" command, I Googled "mysql show grants syntax". In both cases, the top Google search results were pointing to the proper pages on Mysql's site.

    Comment

    • nomad
      Recognized Expert Contributor
      • Mar 2007
      • 664

      #3
      you could use a PHP code to do this.

      nomad

      Comment

      Working...