Results 1 to 6 of 6

Thread: How to detect failure of MySQL database tables

  1. #1
    Join Date
    Feb 2010
    Posts
    119

    How to detect failure of MySQL database tables

    Hi everybody,

    I am using MySQL database, it have lots of process, a variety of accident Database Table damage, and these data are often the latest data, and can not be found in the backup data. Si i want to know that how to detect failure of MySQL database tables. Please suggest. Thanks in advance.

  2. #2
    Join Date
    Apr 2008
    Posts
    1,948

    How to detect failure of MySQL database tables

    Table Fault Detection and amendment of the general process is as follows:

    # Check the error table. If the table check is passed, then complete the task, he must repair the error database table.
    # Begin repairing the table before copying the file to ensure data security.
    # Begin the restoration of the database table.
    # If the repair fails, the backup from the database or update Log to recover the data.

  3. #3
    Join Date
    May 2008
    Posts
    2,012

    Re: How to detect failure of MySQL database tables

    You need to establishment of a database backup and use the updated log, to prevent repair failure, loss of data. If you are on the Unix platform, table maintenance, it should first registered to a dedicated account for mysql, in order to avoid the table to read and write access to create ownership, as well as destruction of the database directory all the permissions. All the best.

  4. #4
    Join Date
    Apr 2008
    Posts
    2,005

    Re: How to detect failure of MySQL database tables

    MySQL myisanchk and isamchk utility is very similar, basically they have the same use of Methods. The main difference between them when used in the table type. In order to check / repair MyISAM tables (. MYI, and. MYD), you should use the myisamchk utility. In order to check / repair ISAM tables (. ISM and. ISD), you should use the isamchk utility. In order to use either one to use the program, should indicate you want to check or repair tables, myisamchk, and isamchk used methods are:
    Code:
    shell> myisamchk options tbl_name
    shell> isamchk options tbl_name

  5. #5
    Join Date
    May 2008
    Posts
    2,297

    Re: How to detect failure of MySQL database tables

    You can also specify a name as an index file (with ". MYI" or ". ISM" suffix), which allows you to use pattern "*. MYI" or ". ISM" to specify a directory all of the tables. For example, if you are in a database directory, you can check the directory so that all of the table:
    Code:
    shell> myisamchk *. MYI
    shell> isamchk *. ISM
    If you are not in the database directory, you can specify the directory path:
    Code:
    shell> myisamchk options / path / to / database_dir / *. MYI
    shell> isamchk options / path / to / database_dir / *. ISM
    Check and reply.

  6. #6
    Join Date
    Oct 2005
    Posts
    2,393

    How to detect failure of MySQL database tables

    You can even use for the MySQL data directory path to specify a wildcard to act on all of the database all the tables:
    Code:
    shell> myisamchk options / path / to / datadir /*/*. MYI
    shell> isamchk options / path / to / database_dir /*/*. ISM
    This method can not be used in the windows platform. Note that both myisamchk or isamchk the location of the table do not make any judgments, therefore, should be the file or the directory that contains the table run the program, or specify the path name of the table. This allows you to copy the table files to another directory and use the copy instructions. Best of luck.

Similar Threads

  1. MySQL: Entering data in tables
    By Botan in forum Software Development
    Replies: 2
    Last Post: 22-12-2010, 05:44 AM
  2. How to manage databases and tables in MySQL?
    By Aahlaadith in forum Software Development
    Replies: 5
    Last Post: 17-12-2010, 07:18 AM
  3. How to create MySQL Database and Tables in PHP?
    By Orton in forum Software Development
    Replies: 4
    Last Post: 23-02-2010, 06:45 AM
  4. Mysql select from multiple tables for php.
    By afidelino in forum Software Development
    Replies: 4
    Last Post: 09-07-2009, 06:13 PM
  5. Restore corrupted MyISAM/InnoDB tables on MySQL 5.0
    By jean-paul martell in forum Software Development
    Replies: 5
    Last Post: 14-04-2009, 09:03 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,568,206.92149 seconds with 16 queries