Solved

MySQL Create Procedure - Access Denied

Posted on 2008-10-13
3
887 Views
Last Modified: 2012-05-05
I've come across a few similar questions here, but have yet to figure out the answer.

I have a MySQL database that I connect to remotely (using Navicat) as the root user.

I'm trying to create a procedure using the following code (sent to me by a developer);

CREATE DEFINER=`root`@`localhost` PROCEDURE `webservice`.`Qry_WatchList`(_ProductId INT, _WebServiceId INT)
BEGIN
select WatchListId, WSProductId, Title, Description, Currency, Price
from tblwatchlist wl where wl.`ProductId`=_ProductId
and wl.`WebServiceId`=_WebServiceId ;
END $$

I'm getting 'access denied' messages for user root@ - and for life of me I can't figure out why.  I'm able to create databases, tables etc without any issues at all - but this simply will not execute at all.

I also tried;

CREATE PROCEDURE Qry_WatchList(_ProductId INT, _WebServiceId INT)
select WatchListId, WSProductId, Title, Description, Currency, Price
from tblwatchlist wl where wl.ProductId=_ProductId and wl.WebServiceId=_WebServiceId;

With the same result.

Any pointers very much appreciated!
0
Comment
Question by:Maxafi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 22709152
the DEFINER is without the host name..
CREATE DEFINER=`root` PROCEDURE `webservice`.`Qry_WatchList`(_ProductId INT, _WebServiceId INT)
BEGIN
 ...

Open in new window

0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question