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

Restoring a Database (Incomplete)

There are three easy ways:

  • use a reverse of mysqldump
  • use source in mysql
  • copy the data files from the mysql data directory

Mysqldump:

a) cd pathtomysql/bin/
./mysqldump -B mytestdatabase -u myusernamehere -p < mytestdatabase_backup.sql

b) /pathtomysql/bin/mysqldump -B mytestdatabase -u myusernamehere -p < mytestdatabase_backup.sql

c) mysqldump -B mytestdatabase -u myusernamehere -p < mytestdatabase_backup.sql

* Note the inverted symbol from > to <

Via mysql:

Change directory to the path to where the sql file is stored. (eg. mytestdatabase_backup.sql)

Eg. cd /home/user4/backups

Type:

a) cd pathtomysql/bin/
./mysql

b) /pathtomysql/bin/mysql

c) mysql

It will load up the mysql prompt. If its protected by a password, use -u and -p as required.

eg. mysql -u and -p

After you load up mysql you ca


© Copyright, Simplec Services - Australia, 2017

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