I created a stored procedure in phpMyAdmin
CREATE PROCEDURE Sample()
SELECT * FROM feedback
Where could I view this this procedure? If it\'
In PHPMYADMIN 3.5.2.2 version you just click on routines link in top. See the attached image
View stored procedures in phpmyadmin:
Query:
SELECT routine_definition
FROM information_schema.routines
WHERE
routine_name = 'procedure_name' AND routine_schema = 'databasename';
Here's how to get there in phpmyadmin.
The routines
option is available in phpmyadmin
. The link is not visible in PHPmyadmin until you have at least one stored procedure. See the above image and click the routines
link under structure
tab.
In short you can use this sql
SHOW CREATE PROCEDURE Sample;
More information here
UPDATE: If you don't remember the names, you can query the INFORMATION_SCHEMA
database to see all the procedures (well you can use a LIKE on ROUTINE_NAME
, if you remember a partial name)
SELECT ROUTINE_TYPE, ROUTINE_NAME, ROUTINE_DEFINITION FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_SCHEMA='dbname';
under phpMyAdmin, click on your database (Not on the table), then click on "+Routines".
There you can edit/drop all your stored procedures
After clicking home, databases, the database I created the procedure in. It opens the structure window of that database. In the menu bar: "structure, sql, search ,..." there should be routines, if it's not then click on the right item called more and it should be there (curse my netbook for not having a 24 inch screen).
To make sure your database has the procedure click on export, choose "Custom - display all possible options", under "Output:" choose "View output as text", under "Format-specific options:" choose "structure" (just under "dump table"),make sure "Add CREATE PROCEDURE / FUNCTION / EVENT statement" is selected (just a little under "dump table"). Now click Go and your procedure should show up
using: Version information: 3.5.2, latest stable version: 3.5.2.2
select routine_definition
from information_schema.routines
where routine_schema = 'db_name'
and routine_name = 'sp_name';