Host unlimited blogs, sites, forums for $4.95 only with this host

ThePlanet Servers : Quick Nitty Gritty How To Repair MySQL Databases

Theplanet is the world’s most popular provider of cheap, fast and best dedicated servers at an affordable price and godddy is the leading domain name registrar for all the domains hosted on these servers.

This dedicated server discussion started by joec@home on 02 June 2008

Unofficial, No mess, No thrills, No fluff, No Explanation, Absolutely No Guarantee, Ruff and Gruff howto fix MySQL Databases

- Make a temp directory to work in

cd /root
mkdir mysql_tmp
cd mysql_tmp

- Locate the database, ussualy a directory in /var/mysql or /var/lib/mysql

ls -la /var/mysql/_database_name_

- Stop the mysql service, might be called mysql, might be called mysqld
service mysql stop

- Create backup

mkdir _database_name_.backup
cp -a /var/mysql/_database_name_/* /root/mysql_tmp/_database_name_.backup

- Restart MySQL

service mysql start

- Make a backup of the backup to work with so you can try different fixes

mkdir _database_name_.work
cp -a /root/mysql_tmp/_database_name_.backup/* /root/mysql_tmp/_database_name_.work

- Try to repair database, see detailed instructions at http://dev.mysql.com/doc/refman/5.0/en/myisamchk.html for advanced options

cd /root/mysql_tmp/_database_name_.work
myisamchk –recover *.MYI

- Test current fix

service mysql stop
cp -a /root/mysql_tmp/_database_name_.work/* /var/mysql/_database_name_/
service mysql start

You can discuss this at the planet forums or click here to get a dedicated server from theplanet.com for less than $50

This entry was posted in ThePlanet Bookmark this post and come back later for the best web hosting coupons.

This web hosting blog is proudly hosted with reliable Hostgator webhosting for only one cents through this hostgator coupon. If you're new here, you may want to subscribe to this web hosting RSS feed

-->