Database Manager

Adminer is a user interface for managing your database. It is similar to phpMyAdmin but has a reduced footprint and is snappier to work with. For documentation see the Adminer website.

Adminer user interface

Accessing Your Database

You can access your site’s database in three ways.

  • Click on the More menu (kebab/three-dot) in the site list and select Open database manager.
  • Click the Database manager button at the top of the Site info page.
  • Database manager is available through the host machine on port 15100 on your site’s IP (which you can find on the Site info page).

Basic Usage

Switching Databases

When you visit Adminer by clicking a button in DevKinsta, you are always taken to the appropriate database automatically, but you can switch between them within Adminer as well. You can switch between databases using the dropdown at the top of the left-hand sidebar.

Viewing Table Structure

Clicking on any table name in the sidebar will take you to the structure view of that table. You can see each field and the type of data it holds.

Viewing Table Data

Clicking SELECT in the sidebar next to the table name will take you to a page that shows you the first 50 items within that table. You can dive into different parts of the table using the controls at the top of the page.

Adminer select data

You need to click the blue title above the boxes to gain access to the forms they contain. You can then set up views using multiple select, search, sort, limit, and text length directives. Note that your searches are mapped to the URL so you can save views by bookmarking the page.

If you need a more elaborate SQL query to view data, you can click Edit next to the query displayed at the top of the screen to gain access to an SQL editor.

Manipulating Data

You can edit any row by clicking the edit link within the results. When on the select data page you can add new items by clicking the NEW ITEM button. This will give you a form with all the fields to fill out.

You can run complex SQL queries by clicking the SQL COMMAND link at the top of the sidebar. This will take you to the SQL editor where you can type your query. Clicking History in the box below the editor will bring up recently run commands you can load up.

Via Command Line

If you’d like to access your database via the terminal/command line, you can do that.

Enter Through Virtual Machine

Enter the devkinsta_db container:

docker exec -it devkinsta_db bash

Connect to the database:

mysql -h localhost -u root -p

Run SQL commands like:

show databases;

Enter Through Host Machine

You can find this information on the Site info page.

DevKinsta database details.
DevKinsta database details.

Enter the database directly from the host OS:

mysql -h 192.168.99.254 -P 15100 -u root -p
Was this article helpful?