spEditor is an online MySQL Stored Procedure Editor with that allows you to:
- Create / Edit / Delete stored procedures easily online
- Call stored procedures (with custom input parameters)
I’m currently working on a project that could really use some of MySQL’s stored procedures. The problem? I host my web sites through GoDaddy and they don’t offer direct database connectivity or SSH/telnet (unless you want to pay $$ for a dedicated server). So, to write/edit stored procedures, I coded up this nifty little script that accomplishes just that – and does it pretty well. I figured other people out there had the same problem…so here you go…
Keep in mind that this is the first release (I’m calling it a BETA), so if you find some bugs, please let me know – my email address is at the top of the script.
- MySQL 5.0+
- PHP 5+ (with mysqli extensions – see http://us.php.net/mysqli)
Step 1: Download the Editor (download links below).
Step 2: Edit the following lines in the file:
|$server = “mysql_server_name”;||//server name|
|$user = “mysql_user_name”;||//server user name|
|$password = “mysql_password”;||//server password|
|$schema = “mysql_database”;||//database name|
|$use_deterministic = true;||//true | false – some shared hosts require|
|// this to be true (i.e., GoDaddy)|
|//preferences – defaults are OK….|
|$enable_confirmation = true;||//true | false – controls the POP-UP box|
|// (are you sure you want to…)|
|$show_query = false;||//true | false|
|// true = show all queries|
|// false = show query on errors only|
Step 4: Place the file in a secure location (not publically accessible) on your web server. Again, this file must be protected by a .htaccess file as a user with access to this script can really hose your database!
**Note: You may have to change the default extension from .php5 to .php (most shared hosts – like GoDaddy, etc. – require PHP5 scripts to have the .php5 extension, but your situation may vary…).
Step 5: Open the script in a web browser.
Version 0.91 BETA (download link)
Need some help using spEditor? Justin Tubbs has written up a very nice tutorial here.
Version 0.91 BETA – Fixed a bug that allowed a maximum of 64 characters in the parameter list. Fixed a bug related to improperly escaped strings. Confirm message will now appear if update failed and you change pages.
Version 0.9 BETA – First beta release.