FAQ
I can't get CREATE TEMPORARY TABLE to work due to a privilege problem.
Does anyone know what I'm doing wrong?

mysql> update user set create_tmp_table_priv='Y';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 2 Changed: 0 Warnings: 0

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> quit
Bye
[root@priam root]# su - seasft
[seasft@priam seasft]$ mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 48909 to server version: 4.0.2-alpha-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create temporary table x (x int);
ERROR 1142: create command denied to user: 'seasft@localhost' for table 'x'

I've also tried:
grant create temporary tables on * to seasft@localhost;
grant create temporary tables on *.* to seasft@localhost;

Search Discussions

  • Paul DuBois at Aug 13, 2002 at 7:48 pm
    I can't get CREATE TEMPORARY TABLE to work due to a privilege problem.
    Run the mysql_fix_privilege_tables script. There are new privileges
    in 4.0.2, one of which applies to temporary tables.
    Does anyone know what I'm doing wrong?

    mysql> update user set create_tmp_table_priv='Y';
    Query OK, 0 rows affected (0.00 sec)
    Rows matched: 2 Changed: 0 Warnings: 0

    mysql> flush privileges;
    Query OK, 0 rows affected (0.00 sec)

    mysql> quit
    Bye
    [root@priam root]# su - seasft
    [seasft@priam seasft]$ mysql
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 48909 to server version: 4.0.2-alpha-log

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql> create temporary table x (x int);
    ERROR 1142: create command denied to user: 'seasft@localhost' for table 'x'

    I've also tried:
    grant create temporary tables on * to seasft@localhost;
    grant create temporary tables on *.* to seasft@localhost;

    ---------------------------------------------------------------------
    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-thread116988@lists.mysql.com>
    To unsubscribe, e-mail <mysql-unsubscribe-paul=snake.net@lists.mysql.com>
    Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
  • Jocelyn Fournier at Aug 13, 2002 at 7:52 pm
    Hi,

    There is a bug in GRANT for CREATE TEMPORARY TABLE privilege which is fixed
    now in the 4.0.3 tree.

    Regards,
    Jocelyn


    ----- Original Message -----
    From: "Philip Mak" <pmak@animeglobe.com>
    To: <mysql@lists.mysql.com>
    Sent: Tuesday, August 13, 2002 7:38 PM
    Subject: How to create temporary table in 4.0?

    I can't get CREATE TEMPORARY TABLE to work due to a privilege problem.
    Does anyone know what I'm doing wrong?

    mysql> update user set create_tmp_table_priv='Y';
    Query OK, 0 rows affected (0.00 sec)
    Rows matched: 2 Changed: 0 Warnings: 0

    mysql> flush privileges;
    Query OK, 0 rows affected (0.00 sec)

    mysql> quit
    Bye
    [root@priam root]# su - seasft
    [seasft@priam seasft]$ mysql
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 48909 to server version: 4.0.2-alpha-log

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql> create temporary table x (x int);
    ERROR 1142: create command denied to user: 'seasft@localhost' for table 'x'
    I've also tried:
    grant create temporary tables on * to seasft@localhost;
    grant create temporary tables on *.* to seasft@localhost;

    ---------------------------------------------------------------------
    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-thread116988@lists.mysql.com>
    To unsubscribe, e-mail
    <mysql-unsubscribe-joc=presence-pc.com@lists.mysql.com>
    Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmysql @
categoriesmysql
postedAug 13, '02 at 7:37p
activeAug 13, '02 at 7:52p
posts3
users3
websitemysql.com
irc#mysql

People

Translate

site design / logo © 2021 Grokbase