By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,264 Members | 1,100 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,264 IT Pros & Developers. It's quick & easy.

Where stored procedures are stored in mysql

100+
P: 160
Hi

i have study some tutorials of stored procedures for Mysql. I want to know that where stored procedures are saved in Mysql database.

Means if a database exist, how can i check if it has stored procedures.

Thanks
Aug 1 '11 #1

✓ answered by code green

Do you have a database called `mysql` within the MySQL environment?
Expand|Select|Wrap|Line Numbers
  1. SHOW DATABASES
Does this have a proc table?
Expand|Select|Wrap|Line Numbers
  1. SHOW TABLES FROM mysql
Does the table have any stored procedures
Expand|Select|Wrap|Line Numbers
  1. SELECT * FROM mysql.proc

Share this Question
Share on Google+
6 Replies


code green
Expert 100+
P: 1,726
They are not stored in your database.
Well I can only speak for phpMyAdmin, the procedures are stored in a table called `proc` in the system database `mysql`
Aug 2 '11 #2

100+
P: 160
Thanks for your reply.

If these are not stored in database then where it is stored?

is there any way that i can check stored procedures set for a database?
Aug 2 '11 #3

code green
Expert 100+
P: 1,726
Did you not read my post?
They are not 'set' for any particular database.
They are system procedures and the standard seems to be that they are stored in the `mysql` database in a table called `proc`.
You can query this database like any other.
Aug 3 '11 #4

100+
P: 160
Thanks for your reply
but database has no table named 'proc'.
Aug 3 '11 #5

code green
Expert 100+
P: 1,726
Do you have a database called `mysql` within the MySQL environment?
Expand|Select|Wrap|Line Numbers
  1. SHOW DATABASES
Does this have a proc table?
Expand|Select|Wrap|Line Numbers
  1. SHOW TABLES FROM mysql
Does the table have any stored procedures
Expand|Select|Wrap|Line Numbers
  1. SELECT * FROM mysql.proc
Aug 3 '11 #6

100+
P: 160
i do not have full access to system i think that's why database name 'mysql' not displayed with command 'SHOW DATABASES'. i want to ask just one more thing. is that possible that stored procedures are stored other that table 'proc'?
Aug 3 '11 #7

Post your reply

Sign in to post your reply or Sign up for a free account.