Jump to content
View in the app

A better way to browse. Learn more.

AlphaGNU

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Optimize and Repair MySQL Database via CLI - command line

Featured Replies

Posted

Today we’ll learn how we can optimize and repair MySQL databases via command line interface, probably you’ve already optimized and repaired dbs via phpMyAdmin options and its easy to use, but what about you’ve too many databases and wanting to repair and optimize it at once?

No worry today I’ll show you easy way to do it via CLI with single command each for repairing and optimizing databases.

To Repair ALL Database you need to simply run this command :

mysqlcheck -r --all-databases


If you want to Repair single database then use this :

mysqlcheck -r user_db


*user_db is the db name, replace with your one.

To Optimize ALL Database you need to simply run this command :

mysqlcheck -o --all-databases


If you want to Optimize single database then use this :

mysqlcheck -o user_db


*user_db is the db name, replace with your one.

Extras :
If you need to specify username to do the repair and optimize task you can add this pipes :

mysqlcheck -r  -u root -p --all-databases
mysqlcheck -o  -u root -p --all-databases


of for single database :

mysqlcheck -r user_db -u root -p
mysqlcheck -o user_db -u root -p


*this will ask the password for mysql root user

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.