How does one create a password file

Oracle Password File ($ORACLE_HOME/dbs/orapw or orapwSID) stores passwords for users with 
administrative privileges

One needs to create a password file before remote administrators (like OEM) will be allowed to connect.

Follow this procedure to create a new password file
Log in as Oracle software owner

Command

orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=mypasswd

Shutdown the database 
SQL> SHUTDOWN IMMEDIATE

Edit INIT.ORA file and ensure REMOTE_LOGIN_PASSWORDFILE = exclusive is set.

Startup the database 
SQL> STARTUP

NOTE: The orapwd utility presents a security risk in that it receives a password from command line. 
This password is visible in the process table of many systems.

An administrator needs to be aware of this!

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.