Mysql database engine

Discussions related with hosting control panels used, which include cPanel, Plesk, Directadmin etc..

Moderator: Staff

Post Reply
Chester
Posts: 0
Joined: Thu Oct 20, 2016 11:40 am

Mysql database engine

Post by Chester »

Hi,

Can anyone suggest me a database engine to manage the MySQL repair .And also please let me know the commands to repair the tables for the corresponding engine.


shaan N
Posts: 10
Joined: Sat Sep 17, 2016 3:18 pm

Re: Mysql database engine

Post by shaan N »

Hello Chester,

MyISAM and InnoDB are most commonly used database engines.MyISAM is considered as the fastest engine when compared to InnoDB but due to the reason since MyISAM is not transacted and doesn't implement foreign key constraints InnoDB can be considered as the most common Engine used widely.

Commands to repair Database and Table through InnoDB,
-------------------
For checking the all database,

# mysqlcheck -c -u root -p --all-databases

To check a specific DATABASE

# mysqlcheck -c "DATABASE name" -u root -p

-Checks all the tables under the mentioned database name

#mysqlcheck -c "DATABASE name" "TABLE name" -u root -p

-Checks the mentioned tables under the DATABASE name

However if a mysql table passes the check it will display the "OK" for the table.

If the database table has displayed any error means we can repair the table by the following command,

# mysqlcheck -r "DATABASE name" "Table name" -u root -p

-Repair and optimization of tables for all databases

There's a simple command to automatically check, repair and optimize all tables in all databases when running a MySQL server on Linux/Unix/BSD.

# mysqlcheck -u root -p --auto-repair --check --optimize --all-databases

--------------------------


Shaan N
Linux Support Engineer.
Nixtree Solutions
Managed Full Server Backups
https://www.nixtree.com/managed-backups.php

Follow us on : https://twitter.com/nixtree
If you are looking for assistance in server management, please get in touch with our support.
Post Reply