Check and Repair All MySQL Databases on Ubuntu

The following command can be used to check and repair all MySQL databases on a Ubuntu or Debian Linux System. I’ve tested the commands on Ubuntu 20.04 and Debian 10.

Repair MySQL databases on Ubuntu Linux

sudo mysqlcheck --defaults-file=/etc/mysql/debian.cnf --auto-repair --optimize --all-databases

MySQL
Sponsored
database repair on Debian

mysqlcheck --defaults-file=/etc/mysql/debian.cnf --auto-repair --optimize --all-databases

The benefit of the above command is that it uses the debian-sys-maint login to MySQL which is available on every Debian and Ubuntu System, so you don’t have to provide the MySQL root login details.

Sponsored

The post Check and Repair All MySQL Databases on Ubuntu appeared first on FAQforge.

Ubuntu Server Admin

Recent Posts

Ubuntu Weekly Newsletter Issue 909

Welcome to the Ubuntu Weekly Newsletter, Issue 909 for the week of September 7 –…

2 hours ago

Canonical announces it will support and distribute NVIDIA CUDA in Ubuntu

Today Canonical, the publisher of Ubuntu, announced support for the NVIDIA CUDA toolkit and the…

11 hours ago

Ubuntu Added NVIDIA 580 Driver Support for 24.04, 22.04 & 25.04

For user with NVIDIA graphics card, Ubuntu finally added official NVIDIA 580 driver packages for…

17 hours ago

VS Code 1.104 Added Auto Model Selection & Sign in with Google Account

Visual Studio Code 1.104, the August release of Microsoft’s code editor, was released few days…

17 hours ago

Stop Wallpaper Moving when Switching Workspace in Ubuntu 24.04

For GNOME users who don’t like the default workspace switch animation, here’s an extension that…

3 days ago

Warzone 2100 Released 4.6.0 with Spectator Host Mode

Warzone 2100, the free open-source 3D real-time strategy game, released new major 4.6.0 version few…

4 days ago