Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2001
    Posts
    92

    MYSQL bulk table repair

    Hi Guys/Gals

    Some help please :-)

    I am trying to repair all the tables in ALL the databases on my Mysql server.

    from #../../mysql/bin

    ./myisam-recover=#

    or
    ./ myisam -r *.MYI

    all this is not working, any ideas?
    "I believe there is a global need for perhaps five computers."
    (Thomas Watson, IBM boss, 1943)

  2. #2
    Join Date
    Oct 2001
    Location
    Ann Arbor, MI U.S.A.
    Posts
    217
    We use the following startup script to do it:

    Code:
    #!/bin/bash
    #
    # mysqld        This shell script takes care of starting and stopping
    #               the MySQL subsystem (mysqld).
    #
    # chkconfig: - 68 12
    # description:  MySQL database server table checker
    # processname: mysqld.check
    
    # Source function library.
    . /etc/rc.d/init.d/functions
    
    # Source networking configuration.
    . /etc/sysconfig/network
    
    MYSQL_DATADIR='/path/to/mysql/data/dir'
    
    # See how we were called.
    case "$1" in
      start)
        find $MYSQL_DATADIR -name "*.MYI" -print | xargs myisamchk --silent --fast -
    -recover
        ;;
      stop)
        ;;
      *)
        echo $"Usage: $0 {start|stop}"
        exit 1
    esac
    
    exit $?
    Chris
    Chris Wells [clwells - at - nexcess.net]
    Nexcess - Beyond Hosting
    Dearborn, MI DC ● Southfield, MI DC
    Wordpress Hosting, Magento Hosting & More!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •