MySQL Error Code Lookup: Causes and Fixes

Paste a MySQL error number such as 1064, a full line like ERROR 1045 (28000): Access denied for user, a symbol such as ER_DUP_ENTRY, a SQLSTATE, or just the message your application logged, and this tool identifies the error, explains why MySQL raised it and gives a concrete fix with the SQL or configuration to change. It covers the most searched server errors (1000-1999 and the newer 3000+ codes) and client errors (2000-2999) such as 2002 and 2006, notes where MariaDB differs, and generates ready-to-paste handlers for Python, Java, Node.js, Go and PHP. Everything runs in your browser; nothing you paste is sent anywhere.

Common codes:

Do more than mysql error code lookup: causes and fixes — meet Chat2DB

Chat2DB is an AI-powered SQL client for Windows, macOS and Linux. Write SQL in natural language, format and optimize queries automatically, and manage MySQL, PostgreSQL, Oracle and 20+ other databases in one workspace.

MySQL error codes reference (85 common errors)

Every MySQL error has three identifiers: a numeric error code (the errno, e.g. 1062), a symbol (ER_DUP_ENTRY for server errors, CR_ for client-library errors) and a five-character SQLSTATE (23000). The number is the most precise - many different errors share one SQLSTATE such as HY000 or 23000 - so application code should branch on the number. MariaDB shares the 1000–1999 numbering for most classic errors listed here, but diverges for newer codes: the 3000+ errors below are MySQL-only, and MariaDB assigns its own meanings to codes in the 1900s and 4000s. Click any number to load it into the tool above.

Server errors 1000–1999 (classic)

Raised by mysqld and sent to the client. This numbering is shared by MariaDB for almost all of these classic errors.

ErrorSymbolSQLSTATEMeaning
ER_CANT_CREATE_TABLEHY000CREATE/ALTER TABLE failed (often errno 150: bad foreign key).
ER_DB_CREATE_EXISTSHY000Database already exists.
ER_DB_DROP_EXISTSHY000Database to drop does not exist.
ER_DUP_KEY23000Duplicate key while writing (often duplicate FK name).
ER_OPEN_AS_READONLYHY000Table is read only.
ER_CON_COUNT_ERROR08004Too many connections (max_connections reached).
ER_DBACCESS_DENIED_ERROR42000User has no privileges on the database.
ER_ACCESS_DENIED_ERROR28000Access denied - wrong user, host or password.
ER_NO_DB_ERROR3D000No database selected.
ER_BAD_NULL_ERROR23000Column cannot be NULL.
ER_BAD_DB_ERROR42000Unknown database.
ER_TABLE_EXISTS_ERROR42S01Table already exists.
ER_BAD_TABLE_ERROR42S02Unknown table (DROP TABLE).
ER_NON_UNIQ_ERROR23000Column name is ambiguous in a join.
ER_BAD_FIELD_ERROR42S22Unknown column.
ER_WRONG_FIELD_WITH_GROUP42000Non-aggregated column not in GROUP BY (ONLY_FULL_GROUP_BY).
ER_DUP_FIELDNAME42S21Duplicate column name.
ER_DUP_KEYNAME42000Duplicate index name.
ER_DUP_ENTRY23000Duplicate entry for a PRIMARY/UNIQUE key.
ER_PARSE_ERROR42000SQL syntax error.
ER_INVALID_DEFAULT42000Invalid default value for a column.
ER_TOO_LONG_KEY42000Index key too long (767 / 3072 bytes).
ER_WRONG_AUTO_KEY42000AUTO_INCREMENT column must be a key.
ER_CANT_DROP_FIELD_OR_KEY42000Can't DROP column/index - it does not exist.
ER_UPDATE_TABLE_USEDHY000Can't modify a table selected from in a subquery.
ER_RECORD_FILE_FULLHY000The table is full.
ER_TOO_BIG_ROWSIZE42000Row size too large (65,535 bytes or InnoDB page limit).
ER_HOST_NOT_PRIVILEGEDHY000Host is not allowed to connect.
ER_WRONG_VALUE_COUNT_ON_ROW21S01Column count doesn't match value count.
ER_MIX_OF_GROUP_FUNC_AND_FIELDS42000Aggregate mixed with plain columns without GROUP BY.
ER_TABLEACCESS_DENIED_ERROR42000Command denied for table (missing privilege).
ER_NO_SUCH_TABLE42S02Table doesn't exist.
ER_NET_PACKET_TOO_LARGE08S01Packet bigger than max_allowed_packet.
ER_BLOB_KEY_WITHOUT_LENGTH42000TEXT/BLOB indexed without a prefix length.
ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODEHY000Safe update mode blocked UPDATE/DELETE without key WHERE.
ER_LOCK_WAIT_TIMEOUTHY000Lock wait timeout exceeded.
ER_LOCK_TABLE_FULLHY000Total number of locks exceeds the lock table size.
ER_LOCK_DEADLOCK40001Deadlock found; transaction rolled back.
ER_CANNOT_ADD_FOREIGNHY000Cannot add foreign key constraint.
ER_NO_REFERENCED_ROW23000Child row insert/update fails FK (older form).
ER_ROW_IS_REFERENCED23000Parent row delete/update fails FK (older form).
ER_SPECIFIC_ACCESS_DENIED_ERROR42000Needs SUPER / SYSTEM_VARIABLES_ADMIN / other privilege.
ER_MASTER_FATAL_ERROR_READING_BINLOGHY000Replica can't read binlog from source.
ER_WARN_DATA_OUT_OF_RANGE22003Out of range value for column.
WARN_DATA_TRUNCATED01000Data truncated for column.
ER_CANT_AGGREGATE_2COLLATIONSHY000Illegal mix of collations.
ER_UNKNOWN_COLLATIONHY000Unknown collation (e.g. utf8mb4_0900_ai_ci on old server).
ER_OPTION_PREVENTS_STATEMENTHY000Server option (read_only, secure-file-priv) prevents statement.
ER_TRUNCATED_WRONG_VALUE22007Incorrect / truncated datetime or number value.
ER_NO_DEFAULT_FOR_FIELDHY000Field doesn't have a default value.
ER_TRUNCATED_WRONG_VALUE_FOR_FIELDHY000Incorrect string/integer value for column (charset or type).
ER_DATA_TOO_LONG22001Data too long for column.
ER_WRONG_VALUE_FOR_TYPEHY000Incorrect value for function (e.g. STR_TO_DATE).
ER_BINLOG_UNSAFE_ROUTINEHY000Function lacks DETERMINISTIC / NO SQL / READS SQL DATA with binlog on.
ER_BINLOG_CREATE_ROUTINE_NEED_SUPERHY000Creating routines needs SUPER with binlog on.
ER_NO_SUCH_USERHY000DEFINER user of view/routine/trigger doesn't exist.
ER_ROW_IS_REFERENCED_223000Cannot delete/update parent row: FK fails.
ER_NO_REFERENCED_ROW_223000Cannot add/update child row: FK fails.
ER_MAX_PREPARED_STMT_COUNT_REACHED42000Too many prepared statements (max_prepared_stmt_count).
ER_DATA_OUT_OF_RANGE22003Numeric value out of range in expression (e.g. UNSIGNED minus).
ER_ACCESS_DENIED_NO_PASSWORD_ERROR28000Access denied (no password; often auth_socket root).
ER_TRUNCATE_ILLEGAL_FK42000Cannot TRUNCATE a table referenced by a foreign key.
ER_INDEX_COLUMN_TOO_LONGHY000Index column size too large (767 bytes).
ER_CANT_EXECUTE_IN_READ_ONLY_TRANSACTION25006Write attempted inside a READ ONLY transaction.
ER_NOT_VALID_PASSWORDHY000Password does not satisfy the validate_password policy.
ER_MUST_CHANGE_PASSWORDHY000Must reset password with ALTER USER first.
ER_FK_NO_INDEX_PARENTHY000Missing index for FK in the referenced table.
ER_FK_CANNOT_OPEN_PARENTHY000Failed to open the referenced (parent) table.

Server errors 3000 and above (MySQL 5.7 / 8.0+)

Newer server errors added in MySQL 5.7 and 8.0. MariaDB does not use these numbers - its own newer errors live in the 1900s and 4000s with different meanings.

ErrorSymbolSQLSTATEMeaning
ER_QUERY_TIMEOUTHY000max_execution_time exceeded.
ER_INVALID_JSON_TEXT22032Invalid JSON text for a JSON column.
ER_LOCK_NOWAITHY000Lock not available and NOWAIT was set.
ER_TABLE_WITHOUT_PKHY000Table without primary key refused (sql_require_primary_key).
ER_FK_INCOMPATIBLE_COLUMNSHY000FK columns are incompatible (type/charset mismatch).
ER_CHECK_CONSTRAINT_VIOLATEDHY000CHECK constraint violated.
ER_CLIENT_LOCAL_FILES_DISABLED42000LOAD DATA LOCAL disabled on client or server.
ER_CLIENT_INTERACTION_TIMEOUTHY000Disconnected by server for inactivity (wait_timeout).

Client errors 2000–2999 (libmysqlclient / connectors)

Generated by the client library, not the server - usually connection, network or authentication-plugin problems. The mysql client reports them with SQLSTATE HY000.

ErrorSymbolSQLSTATEMeaning
CR_CONNECTION_ERRORHY000Can't connect through local socket.
CR_CONN_HOST_ERRORHY000Can't connect to MySQL server on host:port.
CR_UNKNOWN_HOSTHY000Unknown MySQL server host (DNS).
CR_SERVER_GONE_ERRORHY000MySQL server has gone away.
CR_SERVER_LOSTHY000Lost connection to MySQL server during query.
CR_COMMANDS_OUT_OF_SYNCHY000Commands out of sync.
CR_SSL_CONNECTION_ERRORHY000SSL connection error.
CR_AUTH_PLUGIN_CANNOT_LOADHY000Authentication plugin cannot be loaded (caching_sha2_password).
CR_AUTH_PLUGIN_ERRHY000Authentication plugin reported error (needs secure connection).

How to find the MySQL error number

  • The mysql client prints it directly: ERROR 1146 (42S02): Table 'shop.orders' doesn't exist - 1146 is the number, 42S02 the SQLSTATE.
  • For warnings or a silently failed statement, run SHOW WARNINGS; or SHOW ERRORS; right after it - the Code column is the error number.
  • Inside stored procedures, GET DIAGNOSTICS CONDITION 1 @n = MYSQL_ERRNO, @s = RETURNED_SQLSTATE, @m = MESSAGE_TEXT; exposes the number, SQLSTATE and message in a handler.
  • From a shell on the server, perror 1062 prints the symbol and message for any number (it also decodes OS / InnoDB errno values such as 150).
  • In MySQL 8.0+, SELECT * FROM performance_schema.events_errors_summary_global_by_error WHERE SUM_ERROR_RAISED > 0 ORDER BY SUM_ERROR_RAISED DESC; shows which errors the server has raised and how often.
  • Drivers: err.errno (mysql-connector-python, mysql2), e.args[0] (PyMySQL), SQLException.getErrorCode() (JDBC), MySQLError.Number (Go), errorInfo[1] (PHP PDO).

How to use

  1. Paste the error number (1064), the whole ERROR line from the mysql client or your logs, a symbol like ER_DUP_ENTRY, or a phrase such as Duplicate entry - or click one of the common codes.
  2. Read the report: number, symbol, SQLSTATE, the typical message, why it happens and how to fix it with concrete SQL or my.cnf settings. For free text the best match is shown first with up to four alternatives.
  3. Copy the Handle it in code snippet to catch exactly that error by number in a stored procedure, mysql-connector-python, PyMySQL, JDBC, mysql2, go-sql-driver or PHP PDO.

Frequently asked questions

What is the difference between a MySQL error number, symbol and SQLSTATE?

The error number (errno, e.g. 1062) and its symbol (ER_DUP_ENTRY) identify one specific MySQL error; the symbol is simply the constant name used in the MySQL source and by drivers such as mysql2 (err.code). The SQLSTATE (e.g. 23000) is a five-character code from the SQL standard, and it is much coarser: dozens of MySQL errors share HY000 or 23000. Client-library errors in the 2000-2999 range always report HY000. For reliable error handling, compare the number - getErrorCode() in JDBC, err.errno in Python and Node.js, MySQLError.Number in Go.

Are MariaDB error codes the same as MySQL error codes?

Mostly for the classic ones. MariaDB forked from MySQL 5.5 and kept the 1000-1999 server numbers, so 1045, 1062, 1064, 1146, 1205, 1213, 1451 and 1452 mean the same thing on both. Client errors 2000-2999 come from the client library and also match. They diverge for newer codes: MySQL 5.7/8.0 errors from 3000 upward (such as 3819 check constraint violated or 4031 inactivity disconnect) do not exist in MariaDB, and MariaDB added its own errors in the 1900s and 4000s with different meanings. Check the MariaDB error reference for any code above 1900.

How can I debug a MySQL error against the actual schema faster?

Most errors - 1054 unknown column, 1146 table doesn't exist, 1452 foreign key fails, 1366 incorrect string value - are about the schema, so you need to see the table definition next to the failing statement. Run SHOW CREATE TABLE and SHOW WARNINGS after the statement, or use Chat2DB: download the desktop client at https://chat2db.ai/download or open the web app at https://app.chat2db.ai, connect to MySQL or MariaDB, run the query and let the AI assistant explain the error and propose the corrected SQL with the table structure in view.

More free SQL tools

SQL Formatter & Beautifier
Format and beautify SQL queries online with dialect-aware indentation and keyword casing.
SQL Validator & Syntax Checker
Check SQL syntax online for MySQL, PostgreSQL and more, with clear error messages.
SQL Minifier
Minify SQL by stripping comments and collapsing whitespace into a single line.
MySQL to PostgreSQL Converter
Convert MySQL DDL and queries to PostgreSQL syntax with a best-effort dialect translator.
CSV to SQL Converter
Turn CSV, TSV or pasted Excel data into SQL INSERT statements.
JSON to SQL Converter
Convert a JSON array of objects into SQL INSERT statements.
SQL IN Clause Generator
Paste a list of values and get a ready-to-use SQL IN (...) clause.
SQL Escape & Unescape
Escape single quotes and special characters for safe SQL string literals.
JDBC Connection String Builder
Build JDBC URLs for MySQL, PostgreSQL, SQL Server, Oracle, MariaDB and ClickHouse.
SQL Cheat Sheet
A practical SQL reference: joins, aggregation, window functions, DDL and dialect differences.
UUID Generator (v4 & v7)
Generate UUID v4 and time-ordered UUID v7 in bulk, as plain text, JSON, CSV or SQL.
Cron Expression Generator & Validator
Build and validate cron expressions with plain-English explanations and next run times.
PostgreSQL EXPLAIN Plan Visualizer
Turn EXPLAIN ANALYZE output into a readable plan tree with timings and tuning warnings.
PgBouncer Config Generator
Generate pgbouncer.ini and size connection pools from your app instances and CPU cores.
PostgreSQL Partition Table Generator
Generate RANGE, LIST and HASH partitioning DDL with child partitions and maintenance SQL.
pg_dump Command Generator
Build pg_dump and pg_restore commands with format, filter and parallel job options.
mysqldump Command Generator
Build mysqldump backup commands with scope, options and a matching restore command.
SQL Test Data Generator
Generate realistic fake rows as SQL INSERT statements, CSV or JSON, right in your browser.
PostgreSQL Config Calculator
Calculate tuned postgresql.conf settings from your RAM, CPU cores, connections and workload.
SQL DDL to Code Generator
Convert CREATE TABLE statements into TypeScript, Prisma, Drizzle, Go, JPA or SQLAlchemy models.
SQL Window Function Generator
Build ROW_NUMBER, RANK, LAG, LEAD and running-total OVER() clauses with PARTITION BY and frames.
Docker Compose PostgreSQL Generator
Generate a docker-compose.yml for PostgreSQL with volumes, healthchecks, init scripts and pgAdmin.
PostgreSQL Replication Config Generator
Generate streaming and logical replication config: postgresql.conf, pg_hba.conf, slots and pg_basebackup.
SQL Injection Checker
Scan code for SQL injection risks and rewrite unsafe queries with bound parameters.
SQL to ER Diagram Generator
Paste CREATE TABLE DDL and get an entity relationship diagram plus Mermaid erDiagram code.
Postgres Connection String Generator
Build PostgreSQL connection strings: libpq URI, DSN, JDBC, psycopg, SQLAlchemy, Npgsql and .env.
Postgres GRANT Statement Generator
Generate PostgreSQL GRANT, ALTER DEFAULT PRIVILEGES and REVOKE scripts for read-only or read-write roles.
Postgres COPY Command Generator
Build PostgreSQL COPY and psql \copy commands to import or export CSV with HEADER, DELIMITER, NULL and WHERE options.
Postgres CREATE INDEX Generator
Generate PostgreSQL CREATE INDEX statements: B-tree, GIN, GiST, BRIN, UNIQUE, CONCURRENTLY, partial WHERE, INCLUDE and expression indexes.
Postgres TO_CHAR Date Format Builder
Build PostgreSQL TO_CHAR date format patterns with live preview, presets and generated TO_CHAR / TO_TIMESTAMP statements.
Postgres FDW Setup Generator
Generate postgres_fdw CREATE SERVER, USER MAPPING and IMPORT FOREIGN SCHEMA SQL for querying a remote Postgres database.
Postgres EXCLUDE Constraint Generator
Generate PostgreSQL EXCLUDE constraint SQL: GiST/SP-GiST operators, btree_gist columns, partial WHERE and overlap-check verification.
pgvector Index & Schema Generator
Generate pgvector SQL: vector/halfvec columns, HNSW or IVFFlat indexes, tuned parameters and the matching nearest-neighbour query.
Postgres ALTER COLUMN TYPE Generator
Generate ALTER TABLE ALTER COLUMN TYPE SQL with the right USING cast, a table-rewrite verdict and a batched zero-downtime migration.
Postgres UPSERT Generator
Build INSERT ... ON CONFLICT DO UPDATE/DO NOTHING statements, the MERGE equivalent and the unique index they need.
pg_hba.conf Generator
Generate PostgreSQL client authentication rules with the right connection type, CIDR and auth method.
Postgres Trigger Generator
Generate CREATE TRIGGER SQL and plpgsql trigger functions: updated_at touch, JSONB audit log, operation guards and TG_OP skeletons.
Postgres VACUUM Command Generator
Build VACUUM / VACUUM FULL / ANALYZE commands with the right options, plus monitoring SQL and per-table autovacuum tuning.
SQL Pivot Generator (Rows to Columns)
Generate pivot queries with FILTER or CASE WHEN aggregates, the PostgreSQL crosstab() version and the reverse unpivot.
Epoch & Unix Timestamp Converter
Convert epoch to date and back with auto unit detection, plus to_timestamp and extract(epoch) SQL snippets.
pg_restore Command Generator
Build pg_restore or psql restore commands from a Postgres dump: archive format, parallel jobs, clean, no-owner and single-transaction options.
Postgres JSONB Query Builder
Generate JSONB queries from a nested path and operator, with the matching GIN or expression index and a JSONB cookbook.
SQL Schema Diff & Migration Generator
Compare two SQL schemas and generate the ALTER TABLE up and down migration, with lock and rewrite warnings.
Postgres Table Size Estimator
Estimate table and index size from your columns and row count, including tuple header, alignment padding and column-order savings.
Postgres Full Text Search Generator
Generate tsvector columns, GIN indexes, weighted ranking and ts_headline queries for PostgreSQL full text search.
Levenshtein Distance Calculator
Compute edit distance between two strings with the full DP matrix, edit path and matching Postgres fuzzy search SQL.
SQL Linter & Style Checker
Lint SQL for correctness traps, non-sargable predicates and style issues in your browser.
Database Normalization Analyzer
Find candidate keys and 1NF/2NF/3NF/BCNF violations, then get a lossless decomposition.
Connection Pool Size Calculator
Size your database connection pool from cores, latency and instances, with HikariCP, pgxpool, node-pg, SQLAlchemy and PgBouncer config.
PostgreSQL Error Code Lookup
Look up any SQLSTATE code or paste an error message to get the cause, the fix and how to catch it in your driver.
Postgres Autovacuum Calculator
Work out when autovacuum fires on a table, how much bloat builds up first, and generate per-table ALTER TABLE tuning.
SQL to MongoDB Query Converter
Convert a SQL SELECT into a MongoDB find() call or aggregation pipeline, with $lookup, $group, $match and $sort mapping.
pgloader Config Generator
Build a pgloader .load file to migrate MySQL, SQL Server, SQLite or CSV into PostgreSQL, with cast rules, table filters and verification SQL.
Postgres Upgrade Planner
Compare pg_upgrade, dump/restore and logical replication for a major version upgrade, with downtime estimates, commands and breaking changes.
SQL Join Visualizer
See INNER, LEFT, RIGHT, FULL, CROSS and anti joins run on real sample rows, with the SQL.
SCD Type 2 SQL Generator
Generate slowly changing dimension Type 2 DDL and load SQL for Postgres, Snowflake and BigQuery.
Postgres RLS Policy Generator
Generate PostgreSQL row level security policies for multi-tenant, per-user or role-based access.
Postgres Data Masking Generator
Build masked views, anonymization UPDATEs or PostgreSQL Anonymizer labels for sensitive columns.
Online SQL Playground
Run SQL in your browser against a sample SQLite database, with 10 checked practice exercises.
SQL CASE WHEN Generator
Build searched or simple CASE expressions with full queries and IF/IIF/DECODE equivalents per dialect.
SQL Set Operations Visualizer
See UNION, UNION ALL, INTERSECT and EXCEPT run on real rows, with counts and SQL per dialect.
Postgres Enum Type Generator
Generate CREATE TYPE, ADD VALUE, RENAME VALUE, safe value removal and enum-to-CHECK or lookup migrations.
Postgres Lock Conflict Checker
Check whether two PostgreSQL statements or LOCK TABLE modes block each other, with the conflict matrix and pg_locks queries.
Postgres Timezone Converter
Convert timestamps between IANA zones and generate AT TIME ZONE, SET timezone and date_trunc SQL with DST warnings.
Slow Query Log Analyzer
Group a MySQL or PostgreSQL slow query log by normalized query shape and rank the shapes by total time.
Postgres generate_series Builder
Build generate_series SQL for calendar tables, time buckets, gap-filled reports and test data, with a row preview.
Postgres Index Type Advisor
Pick between B-tree, Hash, GIN, GiST, SP-GiST, BRIN and HNSW for a column and query pattern, with the CREATE INDEX statement and operator class.
Postgres SERIAL to IDENTITY Converter
Convert a SERIAL or BIGSERIAL column to GENERATED AS IDENTITY with the correct setval, rollback and optional bigint widening.
Postgres DROP ROLE Helper
Generate the audit queries, REASSIGN OWNED, DROP OWNED and DROP ROLE script that clears "role cannot be dropped" errors.
pg_stat_statements Query Builder
Build version-correct Top-N pg_stat_statements queries by total time, mean time, calls, cache misses, temp spills or WAL.
AWS DMS Table Mapping Generator
Build a valid AWS DMS table-mappings.json with selection rules, schema and table renames, column removal and source row filters.
ClickHouse MergeTree Table Generator
Generate ClickHouse CREATE TABLE DDL with MergeTree engines, sorting keys, partitioning, TTL and compression codecs.
SQL Server to PostgreSQL Converter
Translate T-SQL DDL and queries to PostgreSQL: brackets, IDENTITY, NVARCHAR, TOP, GETDATE and more.
Docker Compose MySQL & MariaDB Generator
Generate docker-compose.yml for MySQL or MariaDB with volumes, healthchecks, init scripts and phpMyAdmin.
Oracle to PostgreSQL Converter
Translate Oracle DDL and SQL to PostgreSQL: VARCHAR2, NUMBER, NVL, DECODE, SYSDATE, sequences and more.
SQL Server Backup & Restore Command Generator
Generate T-SQL BACKUP and RESTORE scripts with compression, checksum, WITH MOVE, STOPAT and sqlcmd.
pgbench Command Generator
Build pgbench init and benchmark command lines for PostgreSQL load testing.
dbt schema.yml Generator
Turn a CREATE TABLE statement into a dbt schema.yml with data tests and a unit test skeleton.
DBML to SQL Converter
Convert DBML schemas to PostgreSQL or MySQL DDL, and turn existing CREATE TABLE statements back into DBML.
Liquibase Changelog Generator
Turn SQL DDL into a Liquibase changelog in XML, YAML, JSON or formatted SQL, with constraints and rollbacks.
MySQL Config Calculator
Generate a tuned my.cnf from your RAM, cores and workload, with an InnoDB memory budget check.
Debezium Connector Config Generator
Build a Debezium CDC connector config for PostgreSQL, MySQL, SQL Server, Oracle or MongoDB.
MongoDB Connection String Builder
Build or parse mongodb:// and mongodb+srv:// URIs with encoded passwords, auth and replica set options.
MySQL GRANT Statement Generator
Generate MySQL 8 CREATE USER, GRANT, role and REVOKE scripts for read-only, read-write or replication users.
SQL Server Connection String Builder
Build or parse SQL Server connection strings for ADO.NET, ODBC, JDBC, sqlcmd and SQLAlchemy with Encrypt options.
MySQL DATE_FORMAT Builder
Build MySQL DATE_FORMAT and STR_TO_DATE patterns with a live preview and every % format specifier explained.
Oracle tnsnames.ora Generator
Build or parse Oracle tnsnames.ora entries with RAC failover and TCPS, plus EZConnect, JDBC thin URLs and sqlplus.
SQL Server Date Format Converter
Every CONVERT date style code (101, 103, 112, 120, 126…) rendered live, plus a FORMAT() builder and string-to-date help.
SQL INSERT to CSV / JSON Converter
Turn INSERT statements or a mysqldump / pg_dump file into CSV, TSV, JSON or Markdown, with correct quoting and NULLs.
Oracle Date Format Builder
Live TO_CHAR preview for any Oracle date format mask (FM, TH/SP, IW, J, FF), common masks and TO_DATE string parsing.
SQL Parameter Binder
Paste a MyBatis or Hibernate log, or SQL with ?, $1 or :name placeholders, and get runnable SQL with the values filled in.
Postgres Sequence Reset Generator
Fix "duplicate key value violates unique constraint" after imports: generate setval SQL that resets serial and identity sequences to MAX(id)+1.
SQL Data Dictionary Generator
Paste CREATE TABLE DDL and get a data dictionary with types, keys, defaults and comments as Markdown, HTML, CSV or JSON.
OtterMind
OtterMind