mysql_secure_installation: ERROR 1045 (28000): Access denied for user ‘root’@'localhost’ (using password: NO)
Getting this error when trying to run mysql_secure_installation even though you are entering the correct password?
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
This can happen if you have a hash or something weird in your password (it’s a bug). Time to change it! I like to do it this way so it doesn’t leave my password in my command history:
mysql -u root -p use mysql; update user set password=PASSWORD("something-cool") where user='root'; flush privileges; quit
1 Comment
Jump to comment form | comments rss [?] | trackback uri [?]