Repair Crashed MySQL Tables: CHECK, REPAIR and InnoDB Recovery
Fix "table is marked as crashed" and InnoDB corruption: CHECK TABLE, REPAIR TABLE and mysqlcheck for MyISAM, innodb_force_recovery, dump and reload.
Blog
Installing, tuning, securing and backing up MySQL, MariaDB, PostgreSQL, Redis, MongoDB and more.
Fix "table is marked as crashed" and InnoDB corruption: CHECK TABLE, REPAIR TABLE and mysqlcheck for MyISAM, innodb_force_recovery, dump and reload.
Speed up MongoDB: WiredTiger cache size, working set and RAM, indexes, schema design, slow query profiling, write concern, connections, OS settings.
Compare Redis and Memcached on data types, persistence, memory, threading, scaling and use cases, with advice for WordPress, Laravel and apps.
Database replication explained: primary-replica and multi-primary, sync vs async, replication lag, failover and split-brain, MySQL and PostgreSQL.
Install phpMyAdmin on Nginx, create a login user for socket-auth MySQL, hide it behind a custom path, basic auth or IP rules, and keep it updated.
Set up Redis Cluster: hash slots, masters and replicas, node config, creating a 6-node cluster, hash tags, cluster-aware clients, failover and resharding.
Run pgAdmin 4 in server mode with Docker, or the desktop app over an SSH tunnel, connect to PostgreSQL securely, and use its main features.
Elasticsearch/OpenSearch vs Meilisearch vs Typesense for self-hosted search: relevance, analytics and logs, resource use, scaling, licensing and use cases.
Set up PostgreSQL logical replication: wal_level, publications, subscriptions, initial sync, monitoring, and zero-downtime upgrades.
Understand SQL joins with examples: INNER, LEFT, RIGHT and FULL OUTER, CROSS and self joins, anti-joins, common mistakes and join indexing.
Run MySQL or PostgreSQL yourself on a VPS, or use a managed database? Compare cost, control, performance, backups, high availability and security.
Back up PostgreSQL with pg_dump and pg_dumpall: plain, custom and directory formats, parallel dumps, pg_restore, roles, automation and testing.
Tune MySQL and MariaDB on a VPS: InnoDB buffer pool, redo log, connections, temp tables, slow query log, indexes and how to measure before and after.
Create a three-node MongoDB replica set: keyfile auth, replication config, rs.initiate, connection strings, read preferences and failover.
Run Typesense with Docker or apt: API keys, collection schemas, importing documents, typo-tolerant search with filters and facets, HTTPS, clustering, backups.
Why MySQL utf8 isn't real UTF-8: use utf8mb4 everywhere, pick a collation, convert tables, fix garbled text and Illegal mix of collations.
Redis Pub/Sub for real-time messages: PUBLISH and SUBSCRIBE, Node.js and Python examples, scaling WebSockets, delivery limits, and when to use Streams.
Install Elasticsearch from Elastic's repository, set heap and system limits, keep security on, run a single node, and create your first index.
How Redis saves data with RDB snapshots and the append-only file, durability trade-offs, configuration, backups, restore and cache-only setups.
Install the sqlite3 CLI, create and query databases, enable WAL mode for web apps, back up safely with .backup and Litestream, and know its limits.
Use EXPLAIN and EXPLAIN ANALYZE in MySQL: the type, key, rows and Extra columns, full scans, filesort and temp tables, and fixing them with indexes.
Solve MySQL error 2002 can't connect through socket: check the service, find the socket path, fix client config, permissions and startups.
List MySQL and MariaDB databases, tables, columns, users, grants, sizes and running queries with SHOW statements and information_schema queries.
Enable remote PostgreSQL access: listen_addresses, pg_hba.conf rules with scram-sha-256, firewall limits, SSL, SSH tunnels and connection errors.