Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

MySQL Create Procedure - Access Denied

Posted on 2008-10-13
3
Medium Priority
?
903 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 2000 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
In this article, I’ll talk about multi-threaded slave statistics printed in MySQL error log file.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

704 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