SSH Commands

wooden

For the basics in linux shell

SSH Commands Guide List | Suggest A Guide
HostGeekz Hosting Guides | cPanel | Cheap Domains | Web Hosting Talk

Repairing Databases

pathtomysql/bin/mysqlcheck -B --repair

Generally the path to mysql is /usr/local/mysql/ but not always.

If you get an access denied error, you need to login first. If you have root access you can just add a -p on the end.

pathtomysql/bin/mysqlcheck -B -p --repair

Do not enter your password in the command. It will prompt you to login after you press enter. If you need to login with a user account (not root) add an -u for user.

pathtomysql/bin/mysqlcheck -B -u -p --repair

The -B parameter means select a single database or two or three. If you want to repair all of them, use -A instead (root required):

pathtomysql/bin/mysqlcheck -A -p --repair

Remember the different ways of accessing the program:

a) cd pathtomysql/bin/
./mysqlcheck -A -p --repair

b) /pathtomysql/bin/mysqlcheck -A -p --repair

c) mysqlcheck -A -p --repair

Sometimes servers are setup (sbin) so you don't have to type all the full paths or change to them.


© Copyright, Simplec Services - Australia, 2017

Visit HostGeekz.com For More!
Cheap .Com Domains from $8.50