SSH command to repair SQL DB

Discussion in 'MySQL' started by muhabbatain, May 30, 2010.

  1. #1
    Hi,

    Can anybody please tell me how can i repair a SQL DB via SSH? Lets say I have a DB named user_dbname and some tables got problem with them then how can i repair them via ssh? Actually I want to add this command in cron job to auto repeat because of the nature of problem. Please help me.
     
    muhabbatain, May 30, 2010 IP
  2. muhabbatain

    muhabbatain Active Member

    Messages:
    195
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #2
    does it work?

    mysql repair -u db_name -p [password]
     
    muhabbatain, May 30, 2010 IP
  3. muhabbatain

    muhabbatain Active Member

    Messages:
    195
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #3
    Got the solution.. I must share that command. I hope someone must be looking for it

    mysqlcheck -repair -u[username] -p[password] db_name

    :D
     
    muhabbatain, May 30, 2010 IP