Перейти к содержимому

How to Use phpMyAdmin on an iPad

Credentials first, since that's why most people land here.

root / root, host 127.0.0.1, port 3306. phpMyAdmin won't ask you for any of it. You'll need them for your own code though.

Everything else is below.

Why this normally isn't possible

Search for phpMyAdmin on iPad and you'll find install instructions for Ubuntu and Windows. They all begin with installing a package, which iOS doesn't allow, so none of them get you anywhere on a tablet.

DevBox ships both halves instead. MariaDB 10.11 for the server, phpMyAdmin 5.2 for the interface, already wired together. There's nothing to install because it's installed.

Turning it on

MariaDB is off by default. Settings, flip the switch, restart the app when it asks.

After that it starts and stops with the app. You won't have to think about it again.

No login screen

Open a project, Tools menu, phpMyAdmin. The browser opens and you're already inside.

People find this unnerving. They assume they've skipped a step, or that something is misconfigured. Neither. The bundled config uses auth_type = 'config' with the credentials filled in, so phpMyAdmin logs itself in.

It's deliberate. This database isn't reachable from outside your device, so a login form would only mean typing root with your thumbs every time you wanted to look at a table. You go straight to the data instead.

Making a table

Databases in the top bar, name it, Create. Collation utf8mb4_general_ci unless you know why you want something else.

Then either use the visual builder or write it:

CREATE TABLE notes (
  id INT AUTO_INCREMENT PRIMARY KEY,
  title VARCHAR(200) NOT NULL,
  body TEXT,
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

I normally never touch phpMyAdmin's visual table builder. On a tablet without a hardware keyboard it's genuinely quicker than typing that out, so this is the one place I'd recommend it.

Talking to it from code

Same server, same credentials:

<?php
$pdo = new PDO(
    "mysql:host=127.0.0.1;port=3306;dbname=notes;charset=utf8mb4",
    "root",
    "root",
    [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]
);

$stmt = $pdo->prepare("INSERT INTO notes (title, body) VALUES (?, ?)");
$stmt->execute(["From code", "Inserted on the iPad."]);

echo "Row " . $pdo->lastInsertId();

Node with mysql2, Python with whichever MySQL driver you like. Host and port don't change.

Run it, switch to phpMyAdmin, refresh, your row is there. Write code, check the table, write more code. That loop is the entire reason to have both of these on the device rather than one of them.

Importing a dump

Get the .sql file onto the iPad, Files app is fine. Then in phpMyAdmin pick the database, Import tab, choose file, Go.

Size matters far more here than on a laptop. A few megabytes goes through without complaint. Something in the hundreds of megabytes will grind, and the app has to stay on screen for every second of it, because iOS pauses anything you swipe away from.

For a big production dump, pull out the tables you actually need on a desktop first and bring just those across. You'll be looking at real data in about a minute rather than watching a progress bar.

Export works in reverse and is genuinely useful for getting a schema you designed on the tablet onto a real server.

SQLite is in there too

Not every project wants a database server, and DevBox covers the other case just as well.

A SQLite database is one file sitting in your project. Nothing to enable, no restart, nothing to pause when you switch apps. If you're starting something small on a tablet, it's often all you need.

There's no menu item for this one, which is why it goes unnoticed. Tap the database file in the file manager and it opens in phpLiteAdmin.

Extensions it recognises: .sqlite, .sqlite3, .sqlitedb, .db, .db3, .s3db.

You get a table browser and a query box. Which, if you're honest about what you actually do in phpMyAdmin, is most of it.

Wiping it

Settings has a clear option for the MariaDB data. Every database, gone, no undo. Export anything you care about first.

Project files live somewhere else and aren't affected. Saying that explicitly because the warning text makes people hesitate.