Troubleshooting databases
Server errors are shown as
server error <code> (SQLSTATE <state>): <server's message> (<KryoDesk's note>)and the connection console has every statement before the error. Login, password and TLS messages of the connection tab: MySQL, MariaDB and ProxySQL.
Server error codes
Section titled “Server error codes”| Code | Where | Meaning and what to do |
|---|---|---|
1792 (SQLSTATE 25006) |
Query editor | Cannot execute statement in a READ ONLY transaction: the session is read-only by design. Use write mode (Run as change…) on a session with Allow write. |
1295 |
Query editor | The statement is not supported over the prepared statement protocol, which the editor uses so one run is one statement. |
1064 |
Query editor | Syntax error; also what SELECT 1; SELECT 2 gives (one statement per run). For account statements with a password, the message shows '***'. |
3024 (MySQL), 1969 (MariaDB) |
Any read | (stopped by the server’s statement time limit): the 60 s server limit. Narrow the search (pick columns), or run heavy statements elsewhere. |
1142, 1143, 1044 |
Any | No privilege on the table, column or database for this account. |
1071 |
Structure, utf8mb4 | Specified key was too long: index over the key limit; use a prefix or ROW_FORMAT=DYNAMIC (the utf8mb4 review predicts it). |
1118 |
Structure, utf8mb4 | Row size too large: change some VARCHAR columns to TEXT first. |
1062 |
utf8mb4, grid INSERT | Duplicate key; for CONVERT, values equal under the new collation. Nothing is changed. |
3780 / errno 150 |
utf8mb4, foreign keys | Columns of a foreign key differ in character set / collation, or the referenced table does not match. Convert both tables. |
1846 |
Structure | The ALGORITHM / LOCK you chose is not possible for this change; pick another or leave it unset. |
1205 |
Structure, tools | Lock wait timeout: another session holds the table. Find it with SHOW PROCESSLIST; set lock_wait_timeout in the review. |
1435 |
Rename | A table with triggers cannot be renamed into another database. |
9005, 9006, 9001 |
Behind ProxySQL | See ProxySQL. |
KryoDesk refusals
Section titled “KryoDesk refusals”| Message | Cause |
|---|---|
CALL is refused in read-only mode before sending: …; run it in write mode (also BEGIN, XA, START TRANSACTION, SET STATEMENT, MariaDB compound statements, executable comments) |
Read-only refusal of the query editor. |
no statement to run / the statement has n bytes; the editor sends at most 1048576 |
Empty editor, or more than 1 MiB of SQL. |
no database "x" in information_schema.SCHEMATA (dropped, or no privilege) |
The Database of the query tab, or the object of a tool, is not visible to this account. |
column "x" is not in the table (information_schema.COLUMNS); reload the table |
The table changed since the tab loaded it. |
session "x" does not allow write mode (Sessions → edit the session → Database settings → Allow write; quick connections are always read-only) |
Allow write is off. The checkbox is Allow write (write mode in tabs, migration target) in Database settings; it is read at every step, no reconnect needed. |
this is a quick-connect tab: quick connections are always read-only; … |
Quick connections have no saved flags; open the saved session instead. |
Allow write turned off in the session: write mode ended (…); nothing was sent |
Allow write was turned off while write mode was on; write mode ended in every tab of the connection and prepared changes were dropped. |
Production turned on in the session: write mode ended without the production confirmation; … |
Turn write mode on again and confirm the production server, then prepare the change again. |
this tab is logged in as x and the login of session "y" is now z (changed since the tab was opened): … |
The tab was opened with the session’s login, which was changed since. Reconnect the tab, or open the session with Connect as… x (a Connect as… tab writes as exactly its login). |
this tab's recorded Connect as… login (x) differs from the login it is connected as (y): … |
Internal check failed (should not happen); nothing is sent. Reconnect the tab. |
write mode was turned off and on again before the change could be sent; … |
Write mode was left and entered again while the change waited for the connection; prepare it again. |
write mode is off behind ProxySQL: … |
Use a session with In front of the server: The MySQL / MariaDB server itself. |
this session is marked as production: confirm write mode first |
Production session; confirm in the dialog. |
Grid editing off: … has no primary key and no unique key over plain columns … |
Use Run as change… in the query editor. |
the key column "id" is NULL in this row / holds a value longer than shown in the grid |
That row cannot be found exactly; change it with Run as change…. |
Apply or discard the pending changes first … |
Paging, sorting and searching wait for Review SQL… or Discard. |
no prepared change #n in this tab (sent, discarded or replaced); prepare it again / the prepared change #n expired after 300 s |
Prepared changes are held 5 minutes and sent once. |
type the name "x" to confirm; the change was not sent |
TRUNCATE / DROP need the exact name; the change stays prepared. |
the session could not be reset before the change, so nothing was sent and the connection is closed; reconnect in its tab |
COM_RESET_CONNECTION and a new connection both failed. |
the session could not be checked after the statement, so the connection is closed … / … set back to READ ONLY after the change … |
The read-only check failed; nothing more runs on that connection. Reconnect in the connection tab. |
COMMIT: … (whether the transaction was committed is unknown: check the data) |
The connection broke at COMMIT. |
session "x" does not allow changes: turn on "Allow write" in its settings (Sessions → Edit) |
Structure, users or migration target without Allow write. |
this is a quick-connect tab: structure changes run only in saved sessions … |
Save the session first. |
the structure of db.table changed on the server since it was loaded |
Someone changed the table; reload Structure and edit again. |
change n is not held any more (sent, discarded or older than 5 minutes) / was prepared for another connection (reconnected since?) |
Prepare the structure change again. |
… changed since they were loaded (users) |
Another session changed the account’s grants; reload the tab. |
KryoDesk is locked: unlock it to start an export or migration |
App Lock; unlock first. Account changes refuse in the same way. |
app locked: the database password was wiped from memory; unlock to open another connection |
App Lock; unlock first. |
the app lock wiped the database password from memory and the vault has none (password:mysql://…) |
The password was typed at sign-in and not saved: type password in the tab’s console, or save it in the vault. |
the target is behind ProxySQL: … |
Migrate into a session that connects to the server directly. |
source and target are the same database x on host:port |
Pick another target database (Database field) or another server. |
the target has no database x: turn on CREATE DATABASE to create it |
Turn on CREATE DATABASE. |
an export to a file or the clipboard always starts at the first step |
Resume works only for a connection target. |
target: <statement>: no answer within 600s; … |
A target statement ran over 10 minutes; the message names the connection id for KILL QUERY. |
Long statements
Section titled “Long statements”| Where | Client limit | Server limit |
|---|---|---|
| Browsing, search, query editor | 90 s, then no answer from the server within 90s; the connection is closed (the statement may still run on the server; to check: SHOW PROCESSLIST (connection n), to stop it: KILL QUERY n) | 60 s (max_execution_time / max_statement_time) |
| Tools (CHECK, ANALYZE, OPTIMIZE, REPAIR, TRUNCATE, DROP) | 1 h | MariaDB: lifted for these statements |
| Structure changes | 4 h per statement | MariaDB: lifted for these statements |
| Export / migration | 10 min per statement | none set |
TLS is set per session (Encryption: Preferred, Required, Disabled), and every new connection
KryoDesk opens for a change or migration uses the same decision: a certificate accepted without
verification in the connection tab stays unverified there too. The account review warns when a
password would cross a connection without TLS or with an unverified certificate. Certificate and
3159 messages: MySQL, MariaDB and ProxySQL.
ProxySQL
Section titled “ProxySQL”| Message | Meaning and what to check |
|---|---|
the query editor needs a read-only session, and this ProxySQL did not keep SET SESSION TRANSACTION READ ONLY at login (see the console) |
The login console shows why the SET was left out (usually a hostgroup lock). The table views still work. |
behind this ProxySQL the read-only session flag was not kept at login, so the session cannot be verified after a change |
Structure changes are off for this connection; use a direct session. |
ProxySQL locked the session to a hostgroup after the statement: connection reset and set up again |
Shown in a query result: the statement pinned the session (untracked SET, transaction). |
9006 the session is locked to one hostgroup and the query rules route this statement to another |
KryoDesk resets and retries once. Check transaction_persistent of the user and mysql_query_rules in the admin interface; console command proxysql. |
9005 |
Hostgroup lock as above; same handling. During a migration the source stops with a hint to use a session with The MySQL / MariaDB server itself. |
9001 no backend of the target hostgroup answered in time |
SELECT * FROM runtime_mysql_servers; in the admin interface. |
More ProxySQL login messages: MySQL, MariaDB and ProxySQL.