Problem Description
I'm trying to setup up MySQL on mac os 10.6 using Homebrew by `brew install mysql 5.1.52`.
Everything goes well and I am also successful with the `mysql_install_db`.
However when I try to connect to the server using:
/usr/local/Cellar/mysql/5.1.52/bin/mysqladmin -u root password 'mypass'
I get:
<pre>
/usr/local/Cellar/mysql/5.1.52/bin/mysqladmin: connect to server at 'localhost'
failed error: 'Access denied for user 'root'@'localhost' (using password: NO)'</pre>
I've tried to access `mysqladmin or mysql using -u root -proot` as well,
but it doesn't work with or without password.
This is a brand new installation on a brand new machine and as far as I know the new installation must be accessible without a root password. I also tried:
/usr/local/Cellar/mysql/5.1.52/bin/mysql_secure_installation
but I also get
<pre>
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)</pre>
AI-Generated Solution
Powered by LMSouq AI · GPT-4.1-mini
Analyzing problem and generating solution…
Was this solution helpful?