Navigation
- FAQ Home
- All categories
- About Webyog support and about this FAQ
- About the SQLyog program

- Connection issues

- Using the GUI
- Managing your MySQL Database Systems

- Database Schema Synchronization
- MySQL DATA synchronization
- SQL Scheduler and Reporting Tool
- Importing external data
- Backup/Restore
- SQLyog Job Agent (SJA)

- Working with Views, Stored Procedures and Triggers
- Character Set and Localization Issues
- MySQL bugs that affect SQLyog
- Questions on Open Source and Compiling
- Sitemap
Most popular FAQs 
- I get error 1130 "Host is not allowed to ... (169314 views)
- Error no. 2003: Can't connect... (86274 views)
- SQLyog Version History (63952 views)
- Error no. 1045: "Connection denied..." (61348 views)
- Error no. 1251: "Client does not support authentication..." (58317 views)
- Error No. 2005: Unknown MySQL server host... (50193 views)
- What is HTTP-tunneling? (42282 views)
- What Is SSH and SSH-tunneling? (38073 views)
- Can I use SQLyog with the WINE Windows emulator ... (34946 views)
- Why are Stored Procedures not created when I import ... (34267 views)
Latest FAQs 
- SQLyog Version History (2012-01-26 08:20)
- SQLyog is a client for the MySQL server - ... (2011-11-04 04:48)
- I get error 1130 "Host is not allowed to ... (2011-11-01 05:21)
- Problems on Ubuntu 11.x (2011-10-29 13:02)
- Problems creating a functional DSN on 64 bit Windows. ... (2011-09-15 14:34)
Sticky FAQs
Working with Views, Stored Procedures and Triggers
I have full privileges to a database but cannot ALTER a routine. Why?
You experience that you have full privileges to a database (described in GRANT syntax like GRANT ALL PRIVILEGES ON some_database.* TO 'me'@'somehost') but cannot ALTER a routine (Stored Procedure or Stored Function) from SQLyog GUI. You are able to CREATE a routine and DROP same, and you may even have noticed that SQLyog does not generate an ALTER statement, but instead DROPs the existing routine and CREATEs it again.
So the question can be written like this: I can CREATE and DROP in two seperate operations but not DROP+CREATE in one operation. To understand this there are two important things to notice:
1) We do not use the ALTER routine syntax because it is not possible to change the routine body (or the 'code' if you like) with such ALTER statement. MySQL documentation describes here: http://dev.mysql.com/doc/refman/5.1/en/alter-procedure.html
So if we want to let user change the routine body there is only one way: DROP + (re)CREATE. And that is what we do.
2) We also need to display the current routine body for user. In order to get this information from the server we execute SHOW CREATE PROCEDURE .. (or FUNCTION). However that only returns the routine body if user has SELECT privilege to ´mysql´.´proc´ table. MySQL documentation describes here: http://dev.mysql.com/doc/refman/5.0/en/show-create-procedure.html
So in conclusion ALL PRIVILEGES ON some_database.* TO 'me'@'somehost' is not enough for a user to ALTER a routine - also SELECT ON ´mysql´.´proc´ TO 'me'@'somehost' is required for 'me'@'somehost' to be able to use SQLyog ALTER routine functionality.
Tags: -
Related entries:
- Do I need PHP to use SQLyog with MySQL?
- SQLyog Version History
- What kind of ODBC databases are supported by SQLyog Import External Data Tool?
- What is and what is not imported by the SQLyog Import External Data Tool?
- Can I perform "incremental import" with the SQLyog Import External Data Tool?
Last update: 2009-07-17 03:24
Author: Peter Laursen
Revision: 1.0
You can comment this FAQ