How to do login in mysql with unix shell

By below method if password is pass and user name is root

# [mysql dir]/bin/mysql -h hostname -u root -p pass