Skip to the content.

Connect MySQL from CLI without Password

# create ".my.cnf" file and edit it
vi .my.cnf
# paste the following lines inside of ".my.cnf" file
[client]
user=root
password="root"