EDIT
Amazingly enough, INFORMATION_SCHEMA.ROUTINES
does not have a param-list column.
You can use mysql.proc
. For example, looking at a procedure of mine:
SELECT * FROM mysql.proc WHERE name='run' \G
*************************** 1. row ***************************
db: common_schema
name: run
type: PROCEDURE
specific_name: run
language: SQL
sql_data_access: MODIFIES_SQL_DATA
is_deterministic: YES
security_type: INVOKER
param_list:
in query_script text
returns:
body: main_body: begin
if (LEFT(query_script, 1) in ('/', '\\')) and (LEFT(query_script, 2) != '/*') then
begin
declare query_script_file_name text;
set query_script_file_name := query_script;
set query_script := LOAD_FILE(query_script_file_name);
if query_script is null then
call throw(CONCAT('Cannot load script file: ', query_script_file_name));
end if;
end;
end if;
call _interpret(query_script, TRUE);
end
definer: root@localhost
created: 2012-08-17 17:24:46
modified: 2012-08-17 17:24:46
sql_mode:
comment: Run given QueryScript text
character_set_client: utf8
collation_connection: utf8_general_ci
db_collation: latin1_swedish_ci
body_utf8: main_body: begin
if (LEFT(query_script, 1) in ('/', '\')) and (LEFT(query_script, 2) != '/*') then
begin
declare query_script_file_name text;
set query_script_file_name := query_script;
set query_script := LOAD_FILE(query_script_file_name);
if query_script is null then
call throw(CONCAT('Cannot load script file: ', query_script_file_name));
end if;
end;
end if;
call _interpret(query_script, TRUE);
end
Look for the param_list
column (I believe that was your main concern).
Also look for db
, name
, type
.
=================
Alternatively, can use INFORMATION_SCHEMA.ROUTINES
. For example, looking at a procedure of mine:
SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_NAME='run' \G
*************************** 1. row ***************************
SPECIFIC_NAME: run
ROUTINE_CATALOG: NULL
ROUTINE_SCHEMA: common_schema
ROUTINE_NAME: run
ROUTINE_TYPE: PROCEDURE
DTD_IDENTIFIER: NULL
ROUTINE_BODY: SQL
ROUTINE_DEFINITION: main_body: begin
if (LEFT(query_script, 1) in ('/', '\')) then
begin
declare query_script_file_name text;
set query_script_file_name := query_script;
set query_script := LOAD_FILE(query_script_file_name);
if query_script is null then
call throw(CONCAT('Cannot load script file: ', query_script_file_name));
end if;
end;
end if;
call _interpret(query_script, TRUE);
end
EXTERNAL_NAME: NULL
EXTERNAL_LANGUAGE: NULL
PARAMETER_STYLE: SQL
IS_DETERMINISTIC: YES
SQL_DATA_ACCESS: MODIFIES SQL DATA
SQL_PATH: NULL
SECURITY_TYPE: INVOKER
CREATED: 2012-08-17 17:24:46
LAST_ALTERED: 2012-08-17 17:24:46
SQL_MODE:
ROUTINE_COMMENT: Run given QueryScript text
DEFINER: root@localhost
CHARACTER_SET_CLIENT: utf8
COLLATION_CONNECTION: utf8_general_ci
DATABASE_COLLATION: latin1_swedish_ci
In particular, look at the columns ROUTINE_SCHEMA
, ROUTINE_NAME
, ROUTINE_TYPE
, ROUTINE_DEFINITION
. These provide most of the interesting data.
Best Answer
Funny - I'm just doing this myself now (assuming Linux (as per Alex Kuzminsky - I use Xubuntu - no heavy GUI desktop).
Get the source (all source downloads here (select from dropdown), Linux source here).
Run (depends on your Linux distro)
This was all I needed to do after a fresh (Oracle Virtual Box) install of Xubuntu 14.04 LTS.
Then, what I do is follow the instructions here.
Create a directory "sandbox" beside mysql-5.6.16.
then install the mysql-5.6.19-linux_64.tar.gz package (or whatever it's called)
Works nicely for those of use who want to control things and even run several MySQL servers on the same machine using different ports for example.