I am trying to figure out what the mysql -u root -p
command does.
I have googled the command but I can't find any good results.
I am trying to figure out what the mysql -u root -p
command does.
I have googled the command but I can't find any good results.
mysql -u root -p
means, that you trying to connect to MySQL shell with parameters - -u
parameter specified MySQL user name.
-u, --user=name User for login if not current user.
In your case it's root
user.
-p, --password[=name] Password to use when connecting to server. If password is not given it's asked from the tty.
You can type mysql --help
from the command line for more information about all available parameters.
Good luck.
It logs you into mysql as the root user. After -p (Immediately after it incidentally, no spaces) you would include the password.
`mysql -u root -p`
Its initiate a connection of MySQL
.
-u
means that we are going to connect with a username root
-p
means that we will enter username's password
Check man mysql
Your command tries to connect to MySQL on localhost with user "root" and asking for a password