106 articles
Knowledge Base
MySQL & MariaDB
106 articles in the MySQL & MariaDB category · page 1 of 5.
- MySQL ERROR 1146 Table doesn't exist on cPanel: fixes ERROR 1146 means MySQL found no table it could open under that name. Tell a dropped table from an invisible one on cPanel, then restore or reattach it.
- Upgrade MariaDB 10.6 to 10.11 on cPanel: runbook Upgrade MariaDB 10.6 to 10.11 on a cPanel server in one step: check my.cnf for removed options, prove the backup restores, shut down cleanly, then upgrade.
- MySQL point-in-time recovery — the binlog replay runbook Recover a MySQL database to the moment just before a bad DELETE or UPDATE by replaying binary logs onto a spare server. The runbook covers the settings to put in place now, how to find the bad event with mysqlbinlog, and how to copy only the lost rows back.
- Fix ERROR 1040 Too many connections on cPanel MySQL/MariaDB When WordPress or a PHP app on your cPanel server fails with error 1040 too many connections, you can still log in as root through a slot the database keeps for administrators. From there, find the account that used up the connections, close its idle ones and cap it so one site cannot take every site down again.
- LifterLMS data model: post types, meta keys and custom tables Learn how LifterLMS stores courses, lessons, quizzes and orders in the WordPress database, so you can query a live course site with plain SQL. This guide maps each post type, the chain from access plan to order, the _llms_ meta keys that link them, and the wp_lifterlms_ tables that hold student progress.
- WordPress on AWS: RDS MySQL vs Aurora vs Aurora Serverless — which data tier fits This guide compares WordPress on RDS MySQL, Aurora MySQL and Aurora Serverless v2 so you can pick the right AWS database for your site. You will see which read and write patterns suit each one, how each recovers from a failure, and where WP-Admin traffic spikes cause trouble.
- phpMyAdmin blank page on cPanel: find the fatal instead of reinstalling A phpMyAdmin blank page is almost always a PHP fatal that never reached the browser. Surface it from the logs, then work the four real causes in order: extension, session, memory, OPcache.
- MySQL "ERROR 1045: Access denied for user" on cPanel — password, host, or wrong account ERROR 1045 reads like a wrong password, but a MySQL account is the pair user@host. Read the error literally, then work down a fixed order: empty password, missing account, cPanel prefix, localhost versus 127.0.0.1, drifted password, missing grant, authentication plugin.
- How to close MySQL port 3306 in WHM and cPanel without breaking sites A PCI scan flagged port 3306 and turning off Remote MySQL did not close it. Here is how to find every client that still uses 3306, close the port in CSF and WHM, and roll back in one line if a site goes down.
- WooCommerce overselling: the stock race condition that sells the last unit twice A WooCommerce store with stock management on can still oversell during a drop. Confirm it from the order records, find the layer at fault — stale cache, direct _stock writes, MyISAM, a late gateway callback — and fix it in the order that matters.
- phpMyAdmin session timeout: LoginCookieValidity, session.gc_maxlifetime, and the mtime trap Two clocks end a phpMyAdmin session: phpMyAdmin's own idle timer and PHP's garbage collector, which judges the session file by its modification time. Raising one without the other changes nothing. The mechanism, the shared save_path trap, and where the config actually lives on cPanel.
- Seed a MySQL 8.4 replica with the CLONE plugin and GTID auto-positioning Provision a MySQL 8.4 LTS read replica without mysqldump: enable GTIDs and binary logging, grant BACKUP_ADMIN and CLONE_ADMIN, run a remote CLONE INSTANCE FROM, then start replication with SOURCE_AUTO_POSITION=1 — including the syntax MySQL 8.4 removed outright.
- Alter a large MySQL table with pt-online-schema-change How pt-online-schema-change alters a multi-gigabyte MySQL or MariaDB table without a long metadata lock: the shadow table and trigger mechanism, the throttling flags that matter in production, replication safety, cleaning up after an abort, and when native online DDL or gh-ost is the better answer.
- Read a MySQL EXPLAIN query plan: columns, access types, and Extra Learn to read MySQL EXPLAIN output — decode the id, type, key, rows, and Extra columns, spot Using filesort and full table scans, then confirm the fix with EXPLAIN ANALYZE.
- Diagnosing and fixing InnoDB deadlocks (ERROR 1213) How to read the LATEST DETECTED DEADLOCK section of SHOW ENGINE INNODB STATUS, tell an InnoDB deadlock apart from a lock wait timeout, and fix ERROR 1213 with lock ordering, indexing, and application retry.
- Set up asynchronous primary–replica replication on self-managed MariaDB Enable the binary log, create a replication user, take a consistent dump with mariadb-dump --master-data, wire up the replica with GTID or binlog position, start replication, and watch for lag.
- Finding the largest databases and tables eating disk on a cPanel server MySQL's data directory is growing and you need to know which database, which table, and why. Here is how to rank them by size and tell real data from bloat, logs, and temp files.
- Importing a large SQL dump on cPanel over SSH — when phpMyAdmin is the wrong tool Multi-gigabyte database imports time out and fail in phpMyAdmin. The command line has no upload limit and no web timeout — here is the SSH workflow that completes every time.
- MySQL "ERROR 1064: You have an error in your SQL syntax" on a cPanel import or query A query or a dump import dies with ERROR 1064. The fix is to read the part of the message after "near" — and to know the handful of cPanel-specific causes that produce it during restores.
- MySQL "ERROR 1366: Incorrect string value" on cPanel — the emoji-and-charset insert failure Saving a post or order fails with "Incorrect string value" — usually an emoji or accented character hitting a utf8 (not utf8mb4) column. Here is how to find the narrow column and widen it safely.
- MySQL "ERROR 1452: Cannot add or update a child row" on cPanel — foreign key failures and import order An insert or a dump import fails with a foreign-key constraint error. The cause is a child row pointing at a parent that is not there yet — usually import order, or genuinely orphaned data.
- MySQL "ERROR 2002: Can't connect through socket /var/lib/mysql/mysql.sock" on cPanel Nothing can reach MySQL — every client returns ERROR 2002 and the socket file is missing. Either mysqld is down or it is listening somewhere the client is not looking.
- MySQL "server has gone away" (error 2006/2013) on a cPanel host — the four causes worth checking A query dies mid-flight with "MySQL server has gone away". The connection was dropped, not refused — and which setting dropped it tells you exactly what to fix.
- Scheduling automatic per-database backups on cPanel with cron and mysqldump JetBackup covers the whole account nightly, but you often want a per-database dump on its own schedule. Here is a cron + mysqldump routine with rotation that any cPanel account can run.