By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,988 Members | 1,074 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,988 IT Pros & Developers. It's quick & easy.

The -p in MYSQL

P: 10
Guys I was trying to take a tutorial in MSYQL.

I changed my root password, however when I try:

> mysql -u root

I can still login without any password.

However if I do:

> mysql -u root -p
Enter Password:

Then I get prompted, my question is, what is the -p for? And how can I stop root signing in by omitting "-p" as arguments?
Aug 9 '11 #1
Share this Question
Share on Google+
1 Reply


numberwhun
Expert Mod 2.5K+
P: 3,503
In MySQL, if you have no password set for the root user then not using the -p is the only option you have for logging in. The -p tells mysql that a password is set and needs to be entered to validate the user. Here is a link to how to set and/or update the root password. You may want to try setting it again.

Regards,

Jeff
Aug 10 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.