Reputation: 682
I just installed mysql in lion and am now trying to set the root password. I can get into mysql no problem by simply typing:
mysql
But when I try to get in as the root user which should let me in without issue as I have not set the root password yet by typing I get denied:
mysql -u root
Error:
connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: NO)'
I have done plenty of searches on this issue but none have solved the problem. I am just denied no matter what as if there is a password set... I did have an installation of XAMPP installed earlier that I just deleted where I set the root password but I can't imagine there would be any conflict between the two installations... expecially since the XAMPP version has been deleted anyway. I have tried default creds like -u root -p root.
Why is this so difficult to do. I'd like to get on with my training. WTF
Upvotes: 1
Views: 234
Reputation: 2575
As you mention that mysql -u root -p
and mysql_secure_installation
throw same error.So try to install mysql-server
as
apt-get install mysql-server
Upvotes: 1