Where stored procedures are stored in mysql

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • waqasahmed996
    New Member
    • Jun 2008
    • 160

    Where stored procedures are stored in mysql

    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
  • code green
    Recognized Expert Top Contributor
    • Mar 2007
    • 1726

    #2
    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`

    Comment

    • waqasahmed996
      New Member
      • Jun 2008
      • 160

      #3
      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?

      Comment

      • code green
        Recognized Expert Top Contributor
        • Mar 2007
        • 1726

        #4
        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.

        Comment

        • waqasahmed996
          New Member
          • Jun 2008
          • 160

          #5
          Thanks for your reply
          but database has no table named 'proc'.

          Comment

          • code green
            Recognized Expert Top Contributor
            • Mar 2007
            • 1726

            #6
            Do you have a database called `mysql` within the MySQL environment?
            Code:
            SHOW DATABASES
            Does this have a proc table?
            Code:
            SHOW TABLES FROM mysql
            Does the table have any stored procedures
            Code:
            SELECT * FROM mysql.proc

            Comment

            • waqasahmed996
              New Member
              • Jun 2008
              • 160

              #7
              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'?

              Comment

              Working...