Halaman

Senin, 10 Mei 2010

SELECT command denied for table 'proc'

By using MySQL Administrator Tool or phpMyAdmin, we could administer users. For example create Esterina as a new user then grant all available privilege to her. One of the privilige granted was run by this command.

GRANT CREATE ROUTINE ON mydb.* TO esterina@ 'localhost';

The CREATE ROUTINE privilege is needed to create stored routines (procedures and functions).

On her desk, she open TOAD, create some table then create a procedure with this command:

DROP PROCEDURE IF EXISTS mydb.'tester';
CREATE PROCEDURE mydb.'tester'(IN stat INT)
BEGIN
set @STATUS=stat;
END;

The procedure created successfully, but she could not see the procedure on TOAD GUI. She will receive an error message:

MySQL Database Error
SELECT command denied to user esterina@ 'localhost'
for table 'proc';

For her to be able to see her procedure, she must contact her boss, then with super user privilege the adminstrator run this:

GRANT SELECT ON mysql.proc TO esterina@ 'localhost';

Esterina back to her workbench, with tons of plan!

Tidak ada komentar:

Posting Komentar