Can you help with "MySQL Query Browser"?
am 02.02.2006 05:47:53 von Don
I'm new to MySQL and am having a frustrating time figuring out some of
the tools. I'm getting ERROR 1044 when I try to execute the following
sp.
------------------------------
DELIMITER $$
DROP PROCEDURE IF EXISTS `mailmsgs`.`sp_AddNew` $$
CREATE PROCEDURE `mailmsgs`.`sp_AddNew` (date_time datetime,
sender char(255),
xSubject text,
body mediumtext,
msgGroup varchar(45))
BEGIN
INSERT INTO t_Outlook_Msgs values (null, date_Time, sender,
xSubject, body, msgGroup);
END $$
DELIMITER ;
-----------------------------
This is the error:
Error: 1044 SQLSTATE: 42000 (ER_DBACCESS_DENIED_ERROR)
Message: Access denied for user '%s'@'%s' to database '%s'
I don't get this error when I execute other queries against the same
db and table.
Could anybody please enlighten me.
Thank you,
Don
Re: Can you help with "MySQL Query Browser"?
am 02.02.2006 06:15:21 von Bill Karwin
"Don" wrote in message
news:re23u1de6tmapc9kqeeoh1bf6d2mgd2odg@4ax.com...
> DROP PROCEDURE IF EXISTS `mailmsgs`.`sp_AddNew` $$
> CREATE PROCEDURE `mailmsgs`.`sp_AddNew` (
....
>
> Error: 1044 SQLSTATE: 42000 (ER_DBACCESS_DENIED_ERROR)
>
> Message: Access denied for user '%s'@'%s' to database '%s'
>
>
> I don't get this error when I execute other queries against the same
> db and table.
http://dev.mysql.com/doc/refman/5.0/en/create-procedure.html
This page says:
"These statements create stored routines. As of MySQL 5.0.3, to use them, it
is necessary to have the CREATE ROUTINE privilege."
http://dev.mysql.com/doc/refman/5.0/en/privileges-provided.h tml
This page says:
"The CREATE ROUTINE privilege is needed for creating stored routines
(functions and procedures). ALTER ROUTINE privilege is needed for altering
or dropping stored routines, and EXECUTE is needed for executing stored
routines."
See this page for more information about the privilege system and how to go
about granting privileges to database users:
http://dev.mysql.com/doc/refman/5.0/en/privilege-system.html
Regards,
Bill K.