How to connect to mysql? Normally, this would be enough:
$ mysql -uroot -p
this is simplest way. If your user is not root, than check your user name and substitute root with this username.
If you want to connect to database after login, do $ mysql -uroot -p mydbname
To apply dump, do:
$ mysql -uroot -p mydbname < dumpfile.sql
In case where dump file consists db name, do (same command, no db name, but above is more likely):
$ mysql -uroot -p < dumpfile.sql
To create database, you can use:
$ mysql -uroot -e 'create database some_database_name'
In case of problems with password, stackoverflow will help: http://stackoverflow.com/questions/16556497/how-to-reset-or-change-the-mysql-root-password