How to log in to a local database
MySQL -u(username) -p(password).
How to log in to a hosted database.
mysql -u(username) -p(password) -h
How to dump a database from a server.
mysql -u(username) -p(password) -h (db name)>file.sql
Change password.
update user set password=PASSWORD(' new password') where User = ' your username';