Using a mac w/ mountain lion, I just installed mysql. I am now trying to login using the following command
mysql -u mike -p
but get the following error:
ERROR 1045 (28000): Access denied for user 'mike'@'localhost' (using password: YES)
I have referenced the following SO question & answer: MySQL ERROR 1045 (28000): Access denied for user 'bill'@'localhost' (using password: YES)
based on all those answers I need to create a new local user inside mysql command line, but how do I do this if I can't get access to the mysql>
(command line)?
By default, the
root
user has no password in MySQL (unless you set a root password in mysql during the install). Try logging in like this:Note the exclusion of the
-p
argument.Try using:
And then see Grant Syntax for setting the appropriate priviledges.