MySQL: How to log in


If you’re unfamiliar with MySQL you may be following a guide which instructs you to log in as root without actually telling you how; use the following:


mysql -u root -p


This logs you in as the root user (-u signifying which user you want to log in as) and -p signifies that you are logging in with a password, which you will be prompted for after you enter the command. The MySQL root password is set when you install MySQL server.