Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: How to Repair a MySQL Database

  1. #1
    Will.Spencer's Avatar
    Will.Spencer is offline Retired
    Join Date
    Dec 2008
    Posts
    5,033
    Blog Entries
    1
    Thanks
    1,010
    Thanked 2,329 Times in 1,259 Posts

    How to Repair a MySQL Database

    Every active database of any significant size will eventually experience some sort of corruption.

    MySQL is the market leader for open-source databases. Most web software that uses databases supports MySQL and many of those packages support only MySQL.

    Luckily, you can repair all of the databases in your database server with just one command:
    mysqlcheck --auto-repair -e --all-databases -u<MYSQL_USERNAME> -p<MYSQL_PASSWORD> -h<MYSQL_HOST>
    • --auto-repair means "If a checked table is corrupted, automatically fix it."
    • -e means "Check and repair tables."
    • --all-databases means "Check all tables in all databases." It can be replaced with --databases <DATABASE_LIST> to check/repair just one or a few databases.
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

  2. Thanked by:

    m42 (20 December, 2008), Shenron (12 January, 2009)

  3. #2
    MeetHere's Avatar
    MeetHere is offline Newbie Net Builder
    Join Date
    Dec 2008
    Posts
    430
    Blog Entries
    1
    Thanks
    66
    Thanked 27 Times in 24 Posts

  4. #3
    m42's Avatar
    m42
    m42 is offline Administrator
    Join Date
    Dec 2008
    Posts
    725
    Thanks
    686
    Thanked 493 Times in 299 Posts
    Quote Originally Posted by MeetHere View Post
    I use repair button in my mysql admin in cpanel.
    What happens when that doesn't work?
    (

    Diet Fads

  5. #4
    MeetHere's Avatar
    MeetHere is offline Newbie Net Builder
    Join Date
    Dec 2008
    Posts
    430
    Blog Entries
    1
    Thanks
    66
    Thanked 27 Times in 24 Posts
    hmm, never had such problem.
    where should I add the above commands ?

  6. #5
    Charles's Avatar
    Charles is offline Senior Net Builder
    Join Date
    Dec 2008
    Location
    On the Bike
    Posts
    1,211
    Blog Entries
    5
    Thanks
    311
    Thanked 311 Times in 212 Posts
    Quote Originally Posted by m42 View Post
    What happens when that doesn't work?
    A huge amount of cPanel web hosts don't offer full SSH access in the first place.

    Quote Originally Posted by MeetHere View Post
    hmm, never had such problem.
    where should I add the above commands ?
    In an SSH program, like PuTTY.

  7. #6
    m42's Avatar
    m42
    m42 is offline Administrator
    Join Date
    Dec 2008
    Posts
    725
    Thanks
    686
    Thanked 493 Times in 299 Posts
    Quote Originally Posted by Charles View Post
    A huge amount of cPanel web hosts don't offer full SSH access in the first place.
    Talk to Mia/Hostinglizard.com. I refuse to host with anyone who doesn't provide shell access. cPanel is severely limiting. I doubt the hosting company wants to spend time troubleshooting my SQL errors.
    (

    Diet Fads

  8. #7
    Shenron's Avatar
    Shenron is offline Administrator
    Join Date
    Dec 2008
    Location
    Portugal
    Posts
    1,900
    Blog Entries
    2
    Thanks
    561
    Thanked 548 Times in 368 Posts
    Quote Originally Posted by Charles View Post
    A huge amount of cPanel web hosts don't offer full SSH access in the first place.
    Typically, if you're on a shared plan you can't have Root/SSh access.
    VPS plans typically offer it, as well as dedicated.

  9. #8
    Will.Spencer's Avatar
    Will.Spencer is offline Retired
    Join Date
    Dec 2008
    Posts
    5,033
    Blog Entries
    1
    Thanks
    1,010
    Thanked 2,329 Times in 1,259 Posts
    I can't imagine life without SSH. It would be like trying to work with mittens on.
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

  10. #9
    Charles's Avatar
    Charles is offline Senior Net Builder
    Join Date
    Dec 2008
    Location
    On the Bike
    Posts
    1,211
    Blog Entries
    5
    Thanks
    311
    Thanked 311 Times in 212 Posts
    Quote Originally Posted by m42 View Post
    Talk to Mia/Hostinglizard.com. I refuse to host with anyone who doesn't provide shell access. cPanel is severely limiting. I doubt the hosting company wants to spend time troubleshooting my SQL errors.
    Doesn't mean to say that mine doesn't. The only con that I can point out with O2... Is that, depending on which server Nathan places you on, you cannot perform all .htaccess edits (i.e. enabling PHP on HTML).

    I bought a plan with Mia (for a whole year) -- not realizin' that you couldn't have any add-on domains. Kinda unuseable to meh, now.

  11. #10
    m42's Avatar
    m42
    m42 is offline Administrator
    Join Date
    Dec 2008
    Posts
    725
    Thanks
    686
    Thanked 493 Times in 299 Posts
    Quote Originally Posted by Charles View Post
    I bought a plan with Mia (for a whole year) -- not realizin' that you couldn't have any add-on domains. Kinda unuseable to meh, now.
    Odd. I bought his cheapest plan last Nov/Dec and I use add-on domains. Perhaps the terms have changed in the past year?
    (

    Diet Fads

Page 1 of 2 12 LastLast

Similar Threads

  1. [WTS] US Golf Courses Database (MySQL) – 19,168 Records
    By yangyang in forum Content
    Replies: 0
    Last Post: 22 December, 2010, 15:16 PM
  2. MySQL database update
    By proweb in forum Databases
    Replies: 4
    Last Post: 22 May, 2010, 22:55 PM
  3. Replies: 0
    Last Post: 21 April, 2010, 18:35 PM
  4. Backup of Mysql database using PhpMyAdmin
    By mega in forum Databases
    Replies: 2
    Last Post: 14 May, 2009, 10:06 AM
  5. How to Optimize a MySQL Database
    By Tom in forum Databases
    Replies: 0
    Last Post: 23 December, 2008, 10:48 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
  •