My MySQL Database Editor



Purpose

To easily allow me to update test databases I am working on without needing to use the mysql command line or write a custom web page... this script can just be pointed at a database and it will be able to display/add/update/delete entries from any table in the database.

The script does not need to know anything about the database, it will use MySQL queries to find what tables are in the database and let you select a table to edit; after which it will query the table to determine column names and attributes to use in update forms.

I have never used "phpmyadmin" and this is not intended to replace it (I believe that is a powerfull tool, at least many of the hacker attempts against by website are searching for phpmyadmin).
This tool was written for my needs to specifically make it easier for me to update a database(s) easily as needed when I am testing, and is there to 'plug in' while testing and remove when done. It is not a database management tool, it is simply a tool to make life easier when testing.

Functional Notes

Current Limitations

The script only does special input field handling for "char", "varchar", "int" and "enum" type fields. Any other field type will be set as a normal html textarea field for add/update requests.

Not really a limitation as everything will still work, assuming your database doesn't store images or large blobs of course.

Getting the current version if you want it

The mysql_tool.tar.gz file has two files. mysql_tool.php is the database script itself which just needs to be copied somewhere your webserver can find it. dbs_include.php is the include file that contains the database name, userid and password for the database you intend to work on, the script expects that in the same directory you placed mysql_tool.php but you should probably update the script to put it in a more secure place unless this is just for test server use.

Update the dbs_include.php with the details of the database you wish to run it against, use your web browser to access mysql_tool.php, and your database updating can begin.

The todo list

Well I'll never allow an input form for database name, user and password, as user and password must never leave the server.

Have been wondering if instead of a database table selection page being the first page displays I should change it to a database selection page (as only databases acessable to the user will be available anyway) that can then drop down to the table selection page.
But I don't need it yet and I tend to drop a copy of this into application directories I am working on, don't want to make a development tool too generic, so probably will not do that as it will only take about 10mins including testing so no fun there and I don't need it.