mysql - ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) on MAC OSX -
i'm trying reinstall mysql on mac os x yosemite. followed instruction mentioned below
sudo rm /usr/local/mysql sudo rm -rf /usr/local/mysql* sudo rm -rf /library/startupitems/mysqlcom sudo rm -rf /library/preferencepanes/mysql* vim /etc/hostconfig , removed line mysqlcom=-yes- rm -rf ~/library/preferencepanes/mysql* sudo rm -rf /library/receipts/mysql* sudo rm -rf /library/receipts/mysql* sudo rm -rf /var/db/receipts/com.mysql.*
i tried
brew uninstall mysql
after installed mysql using homebrew using command brew install mysql
. after installation when tried run mysql -u root
throws following error
error 1045 (28000): access denied user 'root'@'localhost' (using password: no)
i didn't set password mysql.i don't know what's going wrong.any suggestion appreciated. thank you
i have resolved issue myself.
please check github link: https://github.com/levantuan/access_sql
error 1045 (28000): access denied user 'root'@'localhost' (using password: yes/no)
fix bug access denied on macos 10.12 (sierra)
install mysql (https://dev.mysql.com/downloads/mysql/) if installed, skip step
update password of 'root' access.
open terminal (launchpad -> other -> terminal or (command + space) -> type 'terminal' )
then type follow below:
export path=$path:/usr/local/mysql/bin/
sudo mysqld_safe --skip-grant-tables
then, restart terminal (quit open again)
then, keep type:
export path=$path:/usr/local/mysql/bin/
mysql -u root mysql
flush privileges;
alter user 'root'@'localhost' identified '123456';
\q
sudo /usr/local/mysql/support-files/mysql.server start
extra: start mysql: sudo /usr/local/mysql/bin/mysqld_safe --skip-grant-tables stop mysql: sudo /usr/local/mysql/support-files/mysql.server stop
i hope you
Comments
Post a Comment