Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 12 of 12
  1. #1
    Member
    Join Date
    Mar 2004
    Posts
    30

    Default mysql 5.0 stored procedures

    I have a user that wants to use stored procedures (the main reason to upgrade to 5), anyway i did the upgrade it went well, however when she tried to create a one she get's an access denied.

    PHPmyadmin seems to be in a wierd state, it says the client version is 4.x but sql says it's 5.x. I can't see any permissions in phpmyadmin.

    I tried to do permissions manual

    use db
    grante create procedure * to user blah

    that didn't work, anyone get stored procedures to work from a user account?
    www.teknowebworks.com
    webhosting with media in mind, start at $5/mo

  2. #2
    cPanel Partner NOC cPanel Partner NOC Badge cyon's Avatar
    Join Date
    Jan 2003
    Posts
    323

    Default

    I have the same problems over here, so I bump this thread and ask again: Has anybody a solution for this task?

    Thanks!

  3. #3
    Member
    Join Date
    Aug 2006
    Posts
    6

    Default

    I'm having exactly the same issue. Haven't found a solution yet.

  4. #4
    Registered User
    Join Date
    Apr 2006
    Posts
    3

    Default

    Same problem here too.

  5. #5
    Member
    Join Date
    Dec 2004
    Posts
    9

    Default

    The MySQL client is staticly compiled into PHP. Just recompile Apache/PHP afterwards. Also SP requires that you use the mysqli connection.
    Hope this works!

  6. #6
    Member
    Join Date
    Mar 2004
    Posts
    30

    Default

    Actually, recompliling doesn't seem to help. I solved the problem by running mysql_upgrade as root, to update the system tables from 4 to 5. Seems to have worked, since users can now do sprocs.
    www.teknowebworks.com
    webhosting with media in mind, start at $5/mo

  7. #7
    Member manokiss's Avatar
    Join Date
    Mar 2002
    Posts
    536

    Default

    Hi,
    Wondering what was the workaround to restrict the procedures only to the user dbases.

    As far as i know doing:

    grant create procedure * to user blah

    is allowing to the user create and execute the procedure in and dbase in the server.

    Ty!

  8. #8
    Registered User
    Join Date
    Jul 2007
    Posts
    2

    Default

    Sorry for digging up an old thread, but this issue is killing me. My host (ukhost4u) seem to be struggling to fix this issue. One minute stored procs were fine and dandy, next minute I can't create edit or execute any. Same error as above eg on execute:

    execute command denied to user 'XXX'@'%' for routine YYY

    Did anyone have a workable solution?

  9. #9
    Member
    Join Date
    Mar 2004
    Posts
    30

    Default

    It sounds like your host recompiled mysql again, check to see if they ran mysql_upgrade
    www.teknowebworks.com
    webhosting with media in mind, start at $5/mo

  10. #10
    Registered User
    Join Date
    Jul 2007
    Posts
    2

    Default

    Thanks for the suggestion - Is there a way to check this without asking them? I think they're getting fed up of me!

  11. #11
    Member
    Join Date
    Sep 2004
    Location
    inside a catfish
    Posts
    963
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    I'm also having this problem.

    MySQL 5.0.51
    PHP 5.26
    Apache 1.3.39

    I just recompiled PHP 5 to support mysqli. mysqli is working fine. However, none of my users are able to do the necessary things to allow their sql users that they create to execute a procedure.

    I ran mysql_upgrade (no problems) and then restarted mysql via /scripts/restartsrv_mysql.

    Here is what happens

    root@mach1 [/home/oht/public_html/dev]# /scripts/restartsrv_mysql
    root@mach1 [/home/oht/public_html/dev]# mysql -u oht -p
    Enter password:
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 277
    Server version: 5.0.51a-community MySQL Community Edition (GPL)

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql> grant execute on procedure oht_database.GNZ to 'oht_sql'@'localhost';
    ERROR 1370 (42000): grant command denied to user 'oht'@'localhost' for routine 'oht_database.GNZ'
    mysql>


    oht is the primary account username
    - access to mysql is given

    oht then tries to run the grant command to grant oht_sql the ability to execute the stored procedure oht_database.GNZ - that's when we get the error.

    Obviously as root I am able to issue the grant and everything works fine. But, if users cannot set up their own mysql users with the ability to create/execute stored procedures, there is no use having this functionality on the server... right?

    Any suggestions folks?

    Mike

  12. #12
    cPanel Development cpanelkenneth's Avatar
    Join Date
    Apr 2006
    Posts
    3,788
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by mtindor View Post
    I'm also having this problem.

    MySQL 5.0.51
    PHP 5.26
    Apache 1.3.39

    I just recompiled PHP 5 to support mysqli. mysqli is working fine. However, none of my users are able to do the necessary things to allow their sql users that they create to execute a procedure.

    I ran mysql_upgrade (no problems) and then restarted mysql via /scripts/restartsrv_mysql.

    Here is what happens

    root@mach1 [/home/oht/public_html/dev]# /scripts/restartsrv_mysql
    root@mach1 [/home/oht/public_html/dev]# mysql -u oht -p
    Enter password:
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 277
    Server version: 5.0.51a-community MySQL Community Edition (GPL)

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql> grant execute on procedure oht_database.GNZ to 'oht_sql'@'localhost';
    ERROR 1370 (42000): grant command denied to user 'oht'@'localhost' for routine 'oht_database.GNZ'
    mysql>


    oht is the primary account username
    - access to mysql is given

    oht then tries to run the grant command to grant oht_sql the ability to execute the stored procedure oht_database.GNZ - that's when we get the error.

    Obviously as root I am able to issue the grant and everything works fine. But, if users cannot set up their own mysql users with the ability to create/execute stored procedures, there is no use having this functionality on the server... right?

    Any suggestions folks?

    Mike
    Do it from within the cPanel interface.

    Granting privileges requires administrative level privileges and thus is limited to the MySQL root account.

Similar Threads & Tags
Similar threads

  1. Replies: 0
    Last Post: 02-02-2009, 07:17 AM
  2. stored procedure error in MYSQL
    By KarenP in forum Database Discussions
    Replies: 1
    Last Post: 11-28-2008, 09:04 AM
  3. MySQL 5 & Stored Procedure Permissions
    By rugby148 in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 03-09-2007, 08:11 PM
  4. Spamassassin in Cpanel procedures and where info is stored
    By silverbytes in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 02-07-2007, 03:49 PM
  5. MySQL5 permissions for views/ stored procedures
    By pabloron in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 05-17-2006, 05:48 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube