Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

All About Database Recovery Blog about database recovery software, database corruption error solutions for SQL, Access, MySQL, Oracle, DB2 etc...
Browse by Tags · View All
MySQL Recovery 2
restore sql database 2
sql database backup 2
sql database corruption 2
MySQL table is marked as crashed 1
Clustered index Error in SQL Server 1
fix index error 1
access database repair 1
aoindex error 1
repair corrupt MySQL database 1

Archive · View All
August 2012 3
March 2013 2
December 2012 2
November 2012 2
September 2012 2
June 2012 2
May 2016 1
January 2016 1
August 2015 1
February 2015 1

Verify and Repair Corruption of MySQL Tables with Mysqlcheck Command

Jun 12 2014 12:00AM by adamgorge   

MySQL database system is widely used in both small and large-scale organizations across the world for creating and managing massive amounts of data. A number of predefined queries enable you to insert, retrieve, and manage data that is stored in different tables in your MySQL database. In order to get accurate results, the syntax of the queries must be adequate. Otherwise, the database engine will throw an error notifying the same.

Well, in spite of the inadequate syntax or format of the queries, you may come across random error messages if some issues with the database are there. For instance, a database may be corrupt due to some random issues. Fortunately, you have MySQL inbuilt mysqlcheck command to check and repair corrupt MySQL database as well as to optimize the MySQL database.

Checking Single Table

If you get an error message that says the specific database table is corrupt, you can check and repair that table with the mysqlcheck command in the following way:

# mysqlcheck -c <databasename> <tablename> -u root -p
Enter password:
databasename.tablename OK

If the password not entered, you see the following error message:

# mysqlcheck -c <databasename> <tablename>
mysqlcheck: Got error: 1045: Access denied for user 'root@localhost' (using password: NO) when trying to connect

Checking All Tables

After you fix corruption in a specific table as above, in case the error persists or some other error appears and specifies corruption in the database, run the following command to check and repair the entire database:

# mysqlcheck -c <databasename> -u root -p
Enter password:
newdatabasename.table1 OK
newdatabasename.table2 OK
newdatabasename.table3 OK
.

Note: Here OK notifies the status of the particular database table.

Checking All Databases as well as All Tables

You can also check all the databases and their respective tables for corruption with the following command. Simply mention -all-databases in the query.

#mysqlcheck -c -u root -p –all-databases
Enter password:
databasename.tablename OK
newdatabasename.table1 OK
newdatabasename.table2 OK
newdatabasename.table3 OK
.
.
mysql.help_category
error : Table upgrade required. Please do “REPAIR TABLE 'help_category' ” or dump/reload to fix it!
mysql.help_keyword
error : Table upgrade required. Please do “REPAIR TABLE 'help_keyword' ” or dump/reload to fix it!
.

Checking All Tables of Specific Databases

The mysqlcheck command allows you to check all tables of some specific databases in the database system. Run the following command in this regard:

# mysqlcheck -c -u root -p –databases databasename newdatabasename
Enter password:
databasename.tablename OK
newdatabasename.table1 OK
newdatabasename.table2 OK
.

Analyzing Table with mysqlcheck Command

You can analyze the tables in the database to know its status with the mysqlcheck command using an option. Run the following command:

# mysqlcheck -a <databasename> <tablename> -u root -p
Enter password:
databasename.tablename Table is already up to date

The aforementioned command uses ANALYZE TABLE keyword internally. Meanwhile the particular table is available in Read-only mode for other processes.

Optimizing Table with mysqlcheck Command

You can optimize the tables in the database with the same mysqlcheck command with -o option. Run the following command:

# mysqlcheck -a <databasename> <tablename> -u root -p
Enter password:
databasename.tablename OK

The aforementioned command uses OPTIMIZE TABLE keyword internally. With this command, you reclaim the spaces vacated after deleting one or more rows in the table. The same also defragments the particular table.

Repairing Tables with mysqlcheck command

You can repair the tables in the database with the same mysqlcheck command with -r option. Run the following command:

# mysqlcheck -r <databasename> <tablename> -u root -p
Enter password:
databasename.tablename OK

The aforementioned command uses REPAIR TABLE keyword internally and fixes the issues causing corruption in the tables.

As an alternative to all these commands, you can repair MySQL database with a commercial MySQL database repair tool.

Tags: 


adamgorge
147 · 1% · 340
0
Liked
 
0
Lifesaver
 
0
Refreshed
 
0
Learned
 
0
Incorrect



Submit

Your Comment


Sign Up or Login to post a comment.

    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]