MySQL / MariaDB
Articles in the MySQL / MariaDB category (19).
Articles in the MySQL / MariaDB category (19).
- Azure MySQL: connect (password or Entra ID token) and import with mysqlsh — Connect to Azure Database for MySQL with mysql and mysqlsh using an Entra ID token, then import a dump and measure database sizes.
- Back up and restore a MySQL database in a Docker container — Dump and reload a MySQL database running in a Docker container with mysqldump and mysql, and inspect the container network and published ports.
- Calculating the InnoDB buffer pool hit ratio — Calculate the InnoDB buffer pool hit ratio from the status counters, and set the buffer pool size.
- Checking and changing character sets and collations in MySQL — MySQL commands to show the character sets of the server, the session and the databases, and to change the default of a database.
- Docker: run phpMyAdmin to connect to any MySQL server — docker run command to start phpMyAdmin with PMA_ARBITRARY=1.
- Finding InnoDB lock waits and the blocking transaction — MySQL query that lists InnoDB transactions waiting for a lock and the transaction blocking them.
- Install MariaDB on AlmaLinux and move the data directory — Install MariaDB with dnf, secure the installation, move datadir to another volume and adjust the server and client options.
- MySQL / MariaDB: find the data directory and data files — Queries to locate the data directory and tablespace files of MySQL or MariaDB.
- MySQL and MariaDB administration cheat sheet — Common commands to manage the service, configuration, logs, sizes, users and privileges of MySQL or MariaDB.
- MySQL server does not start on CentOS — Diagnostic steps when a MySQL server installed on CentOS does not load its database: services, logs, data directory and error log.
- MySQL: check statistics and tune table_open_cache — Check MySQL cache statistics and raise table_open_cache and table_open_cache_instances.
- MySQL: command-line connections (TCP, socket, legacy server) — Memo of mysql client connections: root via sudo, TCP, Unix socket, MySQL Shell and the --skip-secure-auth option.
- MySQL: connection auditing —
- MySQL: dump, restore and drop all tables — mysqldump and mysql commands to back up, restore, copy and empty MySQL databases, including to a managed Azure server.
- MySQL: InnoDB statistics tables not found after an upgrade — Recreate the InnoDB statistics and replication system tables when MySQL reports them as not found after an upgrade.
- MySQL: list storage engines and the engine of each table — SHOW ENGINES and an information_schema.TABLES query to find each table's engine.
- MySQL: size of each database — List the size of each MySQL database in MB, from information_schema.
- Reset the MySQL root password on CentOS — Reset the MySQL root password by starting the server without its grant tables, then restart it normally.
- Resetting the root password on older MySQL versions — Procedure to reset the MySQL root password on version 5.6 and earlier using --skip-grant-tables, only on a server you administer.