If you don’t want to use long command to login into mysql with your login/password, you have just to create file
.my.cnf in your home directory .
And copy your user and password like in the following example :
[client] user = root password = X7x7x7X6S4z
Then just use the command
mysql to login into MySQL instead of
mysql -u root -p with the password asked each time.
It also provide you the ability to use the command
mysqldump with the database name and the dump file name.