mysql -u root -p
beginner Log in to the server on this machine as root; the client asks for the password instead of taking it on the command line.
Example
mysql -u root -p