execute denied error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    execute denied error

    Hi,

    has anyone an idea, how I can get over this access denied error?

    #1370 - execute command denied to user 'kulturbeutel-lei'@'localhost ' for routine 'kulturbeutel2. set_visits'

    Code:
    CREATE DEFINER=`kulturbeutel-lei`@`localhost` PROCEDURE set_visits(
    		IN  par_ip   VARCHAR(40),
    		IN  par_type VARCHAR(10)
    	)
    BEGIN
    		CALL count_timeout_ip(@num, par_ip, par_type);
    		IF
    			@num = 0
    		THEN
    			CALL new_ip_timeout(par_ip, par_type);
    			UPDATE
    				`myphpgb_statistic`
    			SET
    				`visits` = `visits`+1
    			WHERE
    				`date` = CURDATE();
    		END IF;
    END
    thanks
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    Hi.

    Perhaps an obvious question, but does this user have the permission to use the EXECUTE command on this database?

    Try:
    [code=mysql]GRANT EXECUTE
    ON kulturbeutel2.*
    TO 'kulturbeutel-lei'@'localhost ';[/code]
    This would have to be executed as root.

    Comment

    • Dormilich
      Recognized Expert Expert
      • Aug 2008
      • 8694

      #3
      I'll try that.

      EDIT: that seems to have done the trick, thanks Atli.

      Comment

      • sunkadam
        New Member
        • May 2009
        • 3

        #4
        Hi Atli,

        I'm facing the same prob. But i'm not able to access as root. How can i do that?

        thanks

        Comment

        • Dormilich
          Recognized Expert Expert
          • Aug 2008
          • 8694

          #5
          if it's is not your own host/database, ask your provider to do it for you.

          Comment

          • sunkadam
            New Member
            • May 2009
            • 3

            #6
            yes, i am the admin. but i'm still having the "no privileges" error if i run the command on phpmyadmin

            Comment

            • Dormilich
              Recognized Expert Expert
              • Aug 2008
              • 8694

              #7
              there must definitely be a root account (otherwise it would have been nearly impossible to set up the database in the first place)

              Comment

              • sunkadam
                New Member
                • May 2009
                • 3

                #8
                i myself set up the databases. and added new users with password. and assigned them the databases.

                Comment

                • Dormilich
                  Recognized Expert Expert
                  • Aug 2008
                  • 8694

                  #9
                  yup, and the default user (before you set up any other) is root.

                  Comment

                  • Atli
                    Recognized Expert Expert
                    • Nov 2006
                    • 5062

                    #10
                    Only users with the EXECUTE permission can call procedures, and only root-like users can grant other users that permission.

                    If you can't login as root via your GUI program, have you tried just using the CLI on the server computer?
                    I always prefer doing admin tasks via the command line anyways. Feels a lot safer, somehow.

                    Comment

                    Working...