How does one backup a database using RMAN

The biggest advantage of RMAN is that it only backup used space in the database.
RMAN doesn't put tablespaces in backup mode, saving on redo generation overhead.
RMAN will re – read database blocks until it gets a consistent image of it.

Look at this simple backup example

RMAN target sys/*** nocatalog
Run {
Allocate channel t1 type disk;
Backup
Format '/app/oracle/db_backup/%d_t%t_s%s_p%p'
(Database);
 Release channel t1;
}

Example
RMAN restore
RMAN target sys/*** nocatalog

Run {
Allocate channel t1 type disk;
 # set until time 'Aug 07 2000:51';
Restore table space users;
Recover table space users;
Release channel t1;
}

Examples above are extremely simplistic and only useful for illustrating basic concepts.
By default Oracle uses the database control files to store information about backups.
Normally one would rather setup a RMAN catalog database to store RMAN metadata in.
Read Oracle Backup and Recovery Guide before implementing any RMAN backups

Note: RMAN cannot write image copies directly to tape. One needs to use a third party media manager that integrates with RMAN to backup directly to tape.

Alternatively one can backup to disk and then manually copy the backups to tape. 

How to fix: ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)

Open your terminal and type mysql -u root -p Enter your password. Hopefully your MySQL is logged in now.