Skip to content
In this guide

Guide · Engines

A MySQL GUI client

6 min read

Checked on 0.6.3

Read this when you are picking a desktop client for MySQL, or when one refuses to sign in that the mysql command line accepts. The first half is MySQL: accounts, the default sign-in plugin, TLS, and what a schema change does to a busy table. The second half is what Seqora does on MySQL and what it leaves out. MariaDB started as a fork of MySQL and has drifted since. It has its own page.

Accounts are a user and a host

MySQL matches an account on the user name and the host it connects from, by the access control docs. 'app'@'localhost' and 'app'@'%' are two accounts, with their own passwords and privileges. A login that works on the server can fail from your laptop because the laptop matches the other one.

On Linux and macOS the mysql client also treats the host localhost as a Unix socket, not TCP, by the connecting docs. 127.0.0.1 forces TCP. A desktop client that connects over TCP is not doing what mysql -h localhost did, so test with mysql -h 127.0.0.1 --protocol=TCP when the two disagree.

The first sign-in needs TLS

caching_sha2_password is the default sign-in plugin. The server keeps a cache of accounts that have signed in. A sign-in that misses it, the first after a new account, a password change or a restart, has to travel over TLS or a socket, or exchange an RSA key. Otherwise the client gets error 2061, Authentication requires secure connection. The plugin page has the details.

The older mysql_native_password is off by default in MySQL 8.4 and was removed in 9.0, by its own page. A client that only speaks that plugin can't sign in to a current server with a default account.

TLS that checks

The mysql client's --ssl-mode has five values, from the connection options.

--ssl-mode Encrypts Checks the certificate
DISABLED No No
PREFERRED If it can No
REQUIRED Yes No
VERIFY_CA Yes Signed by the CA you give it
VERIFY_IDENTITY Yes Signed by that CA, and the host name

A server with no certificate configured makes its own at startup, a self-signed CA and certificate in the data directory, by the SSL file docs. So TLS is on from install, and REQUIRED works. A host-name check fails against those generated files, because they don't name your host. For a server across the internet, install a certificate that names it and use VERIFY_IDENTITY.

A schema change commits on its own

DDL in MySQL causes an implicit commit. BEGIN, an ALTER TABLE, then ROLLBACK does not roll the ALTER back. Since 8.0 each DDL statement is atomic on InnoDB, so it applies whole or not at all, but a migration of five statements that fails at the third leaves two applied.

An ALTER TABLE also needs the table's metadata lock, which an open transaction that touched the table holds until it ends, by the metadata locking docs. While the ALTER waits, the statements behind it wait too, and the process list shows them in Waiting for table metadata lock. One forgotten transaction in a client can stall every query on orders.

Online DDL decides how much the change blocks. ALGORITHM=INSTANT changes only metadata. INPLACE and COPY rebuild, with LOCK=NONE, SHARED or EXCLUSIVE. Naming the algorithm you expect makes MySQL refuse the change instead of quietly taking a slower path.

sql_mode decides what bad data does

MySQL 8.4's default sql_mode includes STRICT_TRANS_TABLES, ONLY_FULL_GROUP_BY, NO_ZERO_DATE and ERROR_FOR_DIVISION_BY_ZERO, among others. Under strict mode an INSERT with a value too long for its column fails. Without it, MySQL cuts the value and warns, by the sql_mode docs. A server set up years ago may still run without strict mode, so check SELECT @@sql_mode before trusting a load.

Plans

EXPLAIN FORMAT=TREE arrived in 8.0.16 and EXPLAIN ANALYZE in 8.0.18. EXPLAIN ANALYZE runs the statement and prints real row counts and timings, by the EXPLAIN docs. Column histograms, built with ANALYZE TABLE … UPDATE HISTOGRAM ON …, tell the optimizer how the values in a column are spread, which it uses to estimate rows.

What to look for in a client

  • It speaks caching_sha2_password, and uses TLS for the first sign-in without being told.
  • It verifies the host name when you ask, and says when a connection is encrypted but not checked.
  • It tells you a schema change commits as it goes, before you apply five of them.
  • It doesn't leave a transaction open behind a closed tab, holding a metadata lock.
  • It reads the plan of a query with EXPLAIN ANALYZE, and never runs a write to get one.

Seqora on MySQL

Connect walks the dialog. These are the parts that answer the sections above.

  • TCP only. Seqora connects over TCP, never a socket, so the account it uses is the one that matches your address. The first screen lists a server on your computer as MySQL on localhost:3306.
  • TLS. Prefer tries TLS first and falls back to plaintext only when TLS fails. Require encrypts without checking, like REQUIRED. Verify checks the certificate and the host name, like VERIFY_IDENTITY, against the certificates your operating system trusts. There is no mode that checks the CA without the host name, and no CA file of its own. Through an SSH tunnel, Verify checks the server's own host name, not the tunnel's.
  • Import. Import connections… reads the client groups of ~/.my.cnf, and DBeaver, DataGrip, TablePlus and .env files. mysql_config_editor's .mylogin.cnf is obfuscated on purpose, so Seqora reports that it found one and reads nothing from it.
  • DDL. Design mode (Pro) works on MySQL, and the review says before you apply: "MySQL commits each schema statement on its own. If one fails while applying, the statements before it stay applied." The dry run replays the statements on empty copies of the tables in a scratch database, then drops it.
  • Transactions. After an error inside a transaction the badge reads State unknown until Rollback or Refresh transaction settles it, because MySQL's errors don't report the transaction's state.
  • Editor. SET NAMES, other character set changes, RESET, executable comments (/*! … */) and a bare DELIMITER are refused. A stored program's BEGIN … END body runs when it is wrapped in DELIMITER $$ … $$.
  • Plans (Pro). The Plan tab needs MySQL 8.0.18 or later, and analyzes reads only. Writes are never analyzed on MySQL.
  • Column facts. The inspector shows a column's histogram, and a column without one offers the ANALYZE TABLE … UPDATE HISTOGRAM that builds it.
  • Workload. The session recorder reads performance_schema statement digests, with exact counts per query pattern.

Grid edits, the review, Revert from the grid, the ER diagram, the database brief and watching a table work as they do on PostgreSQL. The index advisor (Pro) ranks indexes to drop, and suggests no adds, because MySQL has no hypothetical indexes to test them with.

Not on MySQL: the lock forecast, undo from the SQL editor, View as role, Test index, and extension pages. MySQL, MariaDB, SQLite and SQL Server has the full table.

Caveats

  • Revert on MySQL covers grid edits. A write from the SQL editor can't be taken back in Seqora.
  • Seqora doesn't sign in with a client certificate. A server whose certificate comes from a private CA passes Verify only once that CA is trusted by your operating system.
  • Statement timeout, in Settings, stops a statement with KILL QUERY, the way Cancel run does, rather than through a session variable.
  • A SET sql_mode has to be the last statement of its script, because the statements after it would be read with the new mode.
  • No MySQL version is certified yet. The target is MySQL 8.4.

Last checked against Seqora 0.6.3, and the MySQL 8.4 Reference Manual on .