Adminer | The World’s Smallest MySQL Admin Script

I’ve spent years using phpMyAdmin (much to my chagrin). And I’ve recently warmed up to MySQL Workbench. But it wasn’t until this week that I stumbled across Adminer, a single-file PHP application for MySQL administration.

It’s hard not to be impressed by Adminer, which is both devilishly simple and elegantly designed. The file downloads as adminer-2.3.2.php ; save it as index.php in a folder named adminer , then navigate to http://servername.com/adminer/ . Supply the name of your MySQL server (adding a colon if it’s hosted on a non-standard port), your username, and password, and you’re off!

(Tip: Bookmark this page! If you go directly to http://servername.com/adminer/ , you’ll need to re-supply your MySQL server credentials.)

Once inside, you can use Adminer to perform most of the basic administration tasks you would perform using phpMyAdmin, MySQL Workbench, or the MySQL command line tools. After using Create Database to add a new schema, for exampl,e you can populatetyour schema using Create Table. The Create Table interface is bare-bones, but also functional: immediately after you finish typing a column name, Adminer auto-adds another blank row for the next column.

Once you’ve created your new table, you can add indexes, key constraints, and triggers. You can review, insert, and delete data using a similarly clean and simple interface.

On the design side, Adminer is extremely theme-able. If you don’t like the default plain Jane style, download one of the adminer.css files from adminer.org, and save it to your adminer directory.

Adminer’s goal is to make the easy things easy: maintaining schemas, reviewing and inserting sample data, and even exporting data are a snap using this script. Like phpMyAdmin and MySQL Workbench, you can inspect the DDL and DML that was executed against your database. The trade-off is that Adminer isn’t as full-featured as its brethren. You won’t get MySQL Workbench’s interactive syntax checking when authoring MySQL. You won’t have phpMyAdmin’s more advanced features, such as server variable configuration and connection management. Many of Adminer’s functions are more limited than those you find in phpMyAdmin. For example, Adminer only dumps tables to two formats (SQL and CSV), compared to phpMyAdmin’s 13.

That said, Adminer does what it does very well. It is easy to install, and lightning fast. I’d recommend keeping this script handy for the majority of your quick-and-dirty MySQL hacking.