List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:October 2 2002 6:55pm
Subject:re: Privileges for CREATE TEMPORARY TABLE?
View as plain text  
At 16:24 +0300 10/2/02, Victoria Reznichenko wrote:
>Alec,
>Tuesday, October 01, 2002, 6:50:31 PM, you wrote:
>
>AdCaQdC> What privileges do I need for creating a TEMPORARY table? I 
>seem to have
>AdCaQdC> locked myself out of this - and yet I can create permanent 
>tables, which
>AdCaQdC> seems the wrong way round.
>
>AdCaQdC> N:\>mysql -ualec
>AdCaQdC> Welcome to the MySQL monitor.  Commands end with ; or \g.
>AdCaQdC> Your MySQL connection id is 1121 to server version: 
>4.0.2-alpha-max-nt
>
>AdCaQdC> Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
>
>AdCaQdC> mysql> show grants for "alec" ;
>AdCaQdC> +------------------------------------------------+
>AdCaQdC> | Grants for alec@%                              |
>AdCaQdC> +------------------------------------------------+
>AdCaQdC> | GRANT ALL PRIVILEGES ON 'test'.* TO 'alec'@'%' |
>AdCaQdC> | GRANT ALL PRIVILEGES ON 'alec'.* TO 'alec'@'%' |
>AdCaQdC> +------------------------------------------------+
>AdCaQdC> 2 rows in set (0.00 sec)
>
>AdCaQdC> mysql> use alec ;
>AdCaQdC> Database changed
>AdCaQdC> mysql> create table perm (col int) ;
>AdCaQdC> Query OK, 0 rows affected (0.02 sec)
>
>AdCaQdC> mysql> create temporary table temp (col int) ;
>AdCaQdC> ERROR 1045: Access denied for user: 'alec@stripped' (Using 
>password: NO)
>
>Since 4.0.2 user must have CREATE TEMPORARY TABLES privilege, it's a
>global level privilege:
>        http://www.mysql.com/doc/en/News-4.0.2.html

As of 4.0.4, it's also a database level privilege, as is the LOCK TABLES
privilege.  This fixes a problem wherein GRANT ALL ON db_name.*
did not grant a user permission to create temp tables or explicitly
lock tables in the given database.

>
>
>--
>For technical support contracts, goto https://order.mysql.com/?ref=ensita
>This email is sponsored by Ensita.net http://www.ensita.net/
>    __  ___     ___ ____  __
>   /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
>  / /|_/ / // /\ \/ /_/ / /__   Victoria.Reznichenko@stripped
>/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
>        <___/   www.mysql.com
>
>
>
>
>
>---------------------------------------------------------------------
>Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
>To request this thread, e-mail <mysql-thread121171@stripped>
>To unsubscribe, e-mail <mysql-unsubscribe-paul=snake.net@stripped>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Thread
Privileges for CREATE TEMPORARY TABLE?Alec.Cawley1 Oct
  • re: Privileges for CREATE TEMPORARY TABLE?Victoria Reznichenko2 Oct
    • re: Privileges for CREATE TEMPORARY TABLE?Paul DuBois2 Oct
re: Privileges for CREATE TEMPORARY TABLE?Alec.Cawley5 Oct
  • re: re: Privileges for CREATE TEMPORARY TABLE?Victoria Reznichenko8 Oct