Everything we've written about MySQL: connections, SQL patterns, imports, clients, and comparisons.
Connect to MySQL from Ruby with mysql2 or trilogy, plus Sequel and ActiveRecord. Working code for connections, pooling, parameterized queries, the utf8mb4 trap, and the caching_sha2_password authentication problem on MySQL 8.
Connect to MySQL from PHP with PDO and mysqli: the utf8mb4 charset, real prepared statements, the EMULATE_PREPARES tradeoff, transactions, SSL, caching_sha2_password, and the errors you actually hit.
Connect to MySQL from C# with MySqlConnector: ADO.NET basics, async commands, parameters, pooling, Dapper and EF Core, the MySql.Data vs MySqlConnector choice, SSL, and the errors you actually hit.
Connect to MySQL from Java with MySQL Connector/J: DriverManager, PreparedStatement, HikariCP pooling, SSL, time zones, and the errors you actually hit in production.
Connect to MySQL from Go with go-sql-driver/mysql and database/sql. Working code for connection pools, the DSN parseTime and loc traps, context timeouts, parameterized queries, and common authentication errors.
Connect to MySQL from Node.js with mysql2. Working code for pools, prepared statements, and async/await, the caching_sha2_password auth error explained, and why the legacy mysql package is no longer an option.
Connect to MySQL from Python with mysqlclient, PyMySQL, MySQL Connector/Python, or SQLAlchemy. Working code for connections, queries, pooling, and common errors.
How to use MySQL aggregate functions: COUNT, SUM, AVG, MIN, MAX, GROUP BY, HAVING, GROUP_CONCAT, and GROUP BY WITH ROLLUP for multi-level summaries.
Learn how to use CTEs in MySQL 8.0+, including recursive CTEs for hierarchical data, multi-step queries, and version compatibility notes.
A practical guide to MySQL date functions: DATE_FORMAT, DATEDIFF, DATE_ADD, DATE_SUB, STR_TO_DATE, NOW, CURDATE, TIMESTAMPDIFF, and timezone handling.
How to use MySQL FULLTEXT indexes and MATCH AGAINST for natural language search, boolean mode, and query expansion, with relevance scoring and gotchas.
Understand MySQL index types (B-tree, FULLTEXT, spatial, covering indexes), how to create them, read EXPLAIN output, and avoid common pitfalls.
A complete guide to MySQL join types with examples: INNER JOIN, LEFT JOIN, RIGHT JOIN, CROSS JOIN, self-joins, anti-joins, and join order optimization.
A practical guide to MySQL JSON functions: JSON_EXTRACT, ->, ->>, JSON_SET, JSON_TABLE, JSON_ARRAYAGG, and JSON_OBJECTAGG, with real query examples.
How to pivot rows into columns in MySQL using CASE/GROUP BY for static pivots and dynamic SQL with prepared statements for runtime column generation.
A practical reference for MySQL string functions: CONCAT, SUBSTRING, REPLACE, REGEXP_REPLACE, GROUP_CONCAT, TRIM, LENGTH, UPPER, LOWER, and more.
Learn how to use MySQL window functions including ROW_NUMBER, RANK, DENSE_RANK, NTILE, LAG, and LEAD with the OVER and PARTITION BY clauses.
How to use MySQL EXPLAIN, EXPLAIN FORMAT=JSON, and EXPLAIN ANALYZE (8.0.18+) to understand query execution plans, identify slow spots, and optimize queries.
How MySQL generated columns work -- the difference between VIRTUAL and STORED, when to index them, practical use cases for computed columns, and the limitations to know.
How MySQL table partitioning works -- RANGE, LIST, HASH, and KEY partition types, partition pruning, and honest limitations before you commit to partitioning.
How to write MySQL stored procedures -- IN/OUT/INOUT parameters, local variables, cursors for row-by-row processing, and DECLARE HANDLER for error handling.
How to use MySQL's JSON_OBJECT and JSON_ARRAY functions to build JSON from relational data, convert legacy string-serialized columns to native JSON, and query the results.
A practical guide to MySQL subqueries -- correlated vs non-correlated, IN vs EXISTS, derived tables, and when to rewrite as a JOIN for better performance.
A complete guide to MySQL transactions -- ACID properties, START TRANSACTION vs autocommit, SAVEPOINT, all four isolation levels, and how InnoDB implements locking.
How MySQL triggers work, how to write BEFORE and AFTER triggers for INSERT, UPDATE, and DELETE, practical use cases, and the performance and debugging pitfalls to know before using them.
How to handle insert-or-update logic in MySQL using INSERT ON DUPLICATE KEY UPDATE, REPLACE INTO, and INSERT IGNORE -- with honest tradeoffs for each approach.
How to create and manage MySQL views, when views are updatable, how WITH CHECK OPTION works, and how to simulate materialized views using tables and events.
Four ways to import Excel data into MySQL: convert to CSV and use LOAD DATA INFILE, Python with pandas, MySQL Workbench's import wizard, and Mako. Covers character sets, date handling, and large files.
Four ways to import JSON data into MySQL: MySQL Shell's importJSON utility, LOAD DATA INFILE, a Python script, and Mako. Covers the JSON column type, indexing, and large file handling.
Four ways to import CSV files into MySQL: LOAD DATA INFILE, mysqlimport, MySQL Workbench, and Mako. Includes permission gotchas and encoding fixes.