Tips
Adminer keeps the frequent tasks within reach and hides the rest instead of dropping it. This page collects the features which are easy to miss and most of them can be tried right away. (demo)
Press Cmd on macOS wherever Ctrl is mentioned. The code at the end of a tip is a permanent link to it.
Selecting data
- Ctrl+click any value in the result to change it right there, Esc puts the original back. Save writes all changed cells at once. (demo) [S1]
- Long texts are shortened to the first 100 characters. Ctrl+click fetches the whole value, an empty Text length shows everything from the start. [S2]
- The Modify link turns the whole result into input fields at once. [S3]
- Click anywhere in a row to tick it. Selecting text by dragging leaves the row alone. [S4]
- Shift+click a checkbox to tick everything between it and the previously clicked one. [S5]
- The checkbox in the header ticks the rows on the current page, the one in Whole result ticks everything matching your filter. With nothing ticked, Edit, Clone and Delete are switched off but Export still covers the whole result. [S6]
- Tick several rows and press Edit to overwrite them together. Columns left at original keep their value in each row. [S7]
- Clone works the same way and inserts copies of all ticked rows. [S8]
- Pick a column and an aggregation function in Select and Adminer builds the GROUP BY query for you, e.g.
author, COUNT(*). (demo) [S9]
- Click the resulting count to see the rows behind it. Your other conditions stay in effect. [S10]
- The SQL operator in the search sends your text to the database as it is: compare two columns (
= other_column), use a subquery (IN (SELECT ...)) or an operator Adminer does not offer, like the PostgreSQL JSON ->>. (demo – such a condition could also change data, so Adminer asks you to send the form again) [S11]
- Leaving the column empty searches in all of them. Adminer skips the columns where your text cannot match anyway, like numeric columns when you search for a word. [S12]
- Move the mouse over a column header: ↓ sorts descending and = opens the search with that column already chosen. [S13]
- An exclamation mark next to the Select button warns that the database will have to read the whole table because no index fits your conditions. [S14]
- Values of foreign keys are links to the referenced row, even in another database or schema. [S15]
- A row count written as
~ 150 is an estimate. Adminer does not count big tables exactly because it would be slow. [S16]
- New item pre-fills the form from your search when you used the
= operator. [S17]
- Import a CSV file straight into the table. A first line matching the column names is used as a header and rows with an existing primary key are updated instead of duplicated. [S18]
Editing rows
- A column showing NULL needs no clicking, just start typing the value and NULL goes away. (demo) [E1]
- Change a value relatively: pick
+ and type 10, or + interval and 1 DAY, or concat to append text. These are offered only where a value already exists, so not on a plain insert. (demo) [E2]
- Pick the SQL function to write an expression of your own, e.g.
REPLACE(text, 'a', 'b'). [E3]
- Functions like
now or uuid hide the value field, because the value comes from the database. [E4]
- A value longer than the column allows is highlighted while you type. [E5]
- Ctrl+Enter sends any form in Adminer. The button which Enter would press is highlighted while you fill the form. [E6]
- Ctrl+Shift+Enter is Save and continue editing when changing a row and Save and insert next when adding one. Saving happens without leaving the page. [E7]
- Ctrl+Shift+↑ and Ctrl+Shift+↓ move to the same field one row up or down. [E8]
- Give the table a primary key, or at least a unique index holding no NULL, and Adminer recognizes each row by it. Without one it has to describe the row by all of its columns, which makes the links long, limits every change to a single row and takes Save and continue editing away. [E9]
Creating and altering tables
- Click the AI radio button first and the column name fills in as
id. (demo) [C1]
- The type, length and NULL of the previous column carry over to the next one, so adding several columns of the same type takes one click each. [C2]
- Name a column
user or user_id and Adminer finds the foreign key itself, plural table names included. [C3]
- For a differently named column you can pick the target yourself from the Foreign keys group at the end of the type list. [C4]
- Drag the ↕ handle to move a column. [C5]
- Click the Length field of an enum or set column and type the values one per line, Adminer quotes them for you. [C6]
- For an index it is enough to pick the columns, the type INDEX and the name fill in by themselves. (demo) [C7]
- A trigger is named after the timing and the event you choose, e.g.
comments_bi. [C8]
Getting around
- The columns in the database overview lead to different pages: Data Length to Alter table, Index Length to Alter indexes, Rows to Select data, Data Free to New item, Auto Increment to Alter table with the current value filled in, which is otherwise left out on purpose. (demo) [G1]
- Click the headers to sort the list of tables. [G2]
- Search data in tables really goes through the data of every table. Tick some tables first to search only in them, and any operator works, including SQL. [G3]
- The Export link opens with the current table already ticked when you use it on a table structure or on its data. [G4]
- The links below the list of tables in Export tick all tables sharing that prefix at once. [G5]
- Ctrl+click or Shift+click the database selectbox or any button to open the result in a new window. [G6]
- Adminer leaves default values out of its addresses, which is why they stay short and are safe to edit by hand, e.g.
limit=, text_length= or page=last. [G7]
- In Database schema, the colours are data types and italics marks the primary key. Drag the tables to arrange them, the arrangement is remembered and there is a permanent link to it. (demo) [G8]
- The process list can clone a running query into SQL command, so you can look at it in peace. [G9]
SQL command
- Ctrl+Enter runs the query, Ctrl+Space completes table and column names. (demo) [Q1]
- Ctrl+click a highlighted keyword to open its documentation. Table names in the query are links to the table. [Q2]
- The result links the primary key of every table involved, so
a JOIN b gives you an edit link for both, as long as the whole key of the table is selected. [Q3]
- Move the mouse over a result header to see which table and column the value really comes from. [Q4]
- The query travels in the address, so history, bookmarks and sending a link to a colleague all work. [Q5]
- Limit rows shows only the first rows but still runs the whole query, and the Export below it then exports all of it. [Q6]
- The history is kept for each database. Edit all loads every past query back into the text field. [Q7]
- Show only errors and Stop on error make importing a big file bearable. [Q8]
- Send several files at once,
.gz is unpacked on the way. A file too big to upload can be put next to the script as adminer.sql and imported from there. [Q9]
- Exporting several tables to CSV gives you one TAR archive. [Q10]
- Ctrl+click a value in the result to change it, the same as when selecting data. Each cell is written to the table it really comes from, so one Save can change both tables of a join without running the query again. Only in MySQL and only where the whole primary key of the table is in the result. (demo) [Q11]
When something goes wrong
- An error after saving is shown on the same address instead of redirecting, so you can fix the cause in another tab and send the same data again by reloading the page. [W1]
- If the session expires while you are saving, log in with the same credentials and the action is carried out. Adminer tells you that it will happen. [W2]
- If you changed a bundled plugin or design and do not want it marked as outdated, rename the plugin file or change the first line of the CSS file. Adminer compares only the files it recognizes. [W3]
- Add
?ext=pdo to the address to connect through PDO when the usual extension misbehaves. It is a way out, not a better way. [W4]
Plugins
- backward-keys: Adds a column with links to the rows referencing the current one, so a foreign key can be followed backwards as well. Adminer Editor does it on its own. (demo) [P1]
- edit-foreign: Turns foreign key columns in the edit form into a list of the rows they can point to, so you pick a row instead of typing its number. Adminer Editor does it on its own. [P2]
- remote-color: Draws a red strip when Adminer or the database does not run on your machine, which is a cheap way not to change production data by mistake. [P3]
- tables-filter: Puts a filter field above the list of tables, hides the tables which do not match as you type and highlights the part which does. The filter stays as long as you keep to the same database. [P4]
- display-foreign-key-name: Displays the first text column of the referenced table instead of the bare number, so a foreign key says who it points to. Adminer Editor does it on its own. [P5]
- sql-claude: Adds a prompt to SQL command which writes the query for you using Anthropic Claude. [P6]