我正在尝试通过brew install mysql 5.1.52使用Homebrew在Mac OS 10.6上设置MySQL。
一切顺利,并且mysql_install_db也很成功。
但是,当我尝试使用以下方法连接到服务器时:
/usr/local/Cellar/mysql/5.1.52/bin/mysqladmin -u root password 'mypass'
我得到:
/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)'
我也尝试mysqladmin or mysql using -u root -proot访问mysqladmin or mysql using -u root -proot ,
但无论有没有密码,它都无法使用。
这是全新计算机上的全新安装,据我所知,必须使用root用户密码才能访问新安装。 我也尝试过:
/usr/local/Cellar/mysql/5.1.52/bin/mysql_secure_installation
但我也得到
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
#1楼
酿造信息mysql
mysql: stable 5.6.12 (bottled)