Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySql - Enable stored procedure feature access using --with-debug in Windows

Tags:

mysql

I'm using MySql commandline 5.6.11 and when I try to see my stored procedure in the command line like

SHOW PROCEDURE CODE sp_my_procedure

I'm getting:

ERROR 1289 (HY000): The 'SHOW PROCEDURE|FUNCTION CODE' feature is disabled; you need MySQL built with '--with-debug' to have it working

How do I use the command to run mysql with "--with-debug" in Windows (I saw the documentation but it talks about how to do that in Linux)?

like image 649
biniam Avatar asked Apr 16 '14 08:04

biniam


People also ask

How do I run a stored procedure in debug mode?

To debugging SP, go to database->Programmability->Stored Procedures-> right click the procedure you want to debug->select Debug Procedure.

How do I enable debugging in MySQL?

If you have some very specific problem, you can always try to debug MySQL. To do this you must configure MySQL with the -DWITH_DEBUG=1 option. You can check whether MySQL was compiled with debugging by doing: mysqld --help. If the --debug flag is listed with the options then you have debugging enabled.

How do I grant a stored procedure to run permissions in MySQL?

The syntax for granting EXECUTE privileges on a function/procedure in MySQL is: GRANT EXECUTE ON [ PROCEDURE | FUNCTION ] object TO user; EXECUTE. The ability to execute the function or procedure.


1 Answers

You need to compile your mysql binary by yourself, see http://dev.mysql.com/doc/refman/5.6/en/source-installation.html, because of

SHOW PROCEDURE CODE proc_name

This statement is a MySQL extension that is available only for servers that have been built with debugging support.

But maybe SHOW CREATE PROCEDURE gives you what you want.

like image 132
VMai Avatar answered Nov 14 '22 23:11

VMai