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.
Mysql database engine
Moderator: Staff
cPanel Server Management
@ 30$ Onwards
@ 30$ Onwards
Re: Mysql database engine
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
--------------------------
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
Linux Support Engineer.
Nixtree Solutions
Managed Full Server Backups
https://www.nixtree.com/managed-backups.php
Follow us on : https://twitter.com/nixtree