ERROR 1045 (28000): Access denied for user 'root'@'localhost'

asked 2016-08-17 02:24:38 -0500

psitist gravatar image

I am setting up devstack liberty in a linux container (ubuntu 14.04) but this error comes frequently.

2016-08-16 15:23:23.664 | + '[' deb = deb ']'
2016-08-16 15:23:23.664 | + sudo mysql -uroot -ppass -h127.0.0.1 -e 'GRANT ALL PRIVILEGES ON *.* TO '\''root'\''@'\''%'\'' identified by '\''pass'\'';'
2016-08-16 15:23:23.678 | ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
2016-08-16 15:23:23.680 | + exit_trap
2016-08-16 15:23:23.680 | + local r=1
2016-08-16 15:23:23.680 | ++ jobs -p
2016-08-16 15:23:23.681 | + jobs=
2016-08-16 15:23:23.681 | + [[ -n '' ]]
2016-08-16 15:23:23.681 | + kill_spinner
2016-08-16 15:23:23.681 | + '[' '!' -z '' ']'
2016-08-16 15:23:23.681 | + [[ 1 -ne 0 ]]
2016-08-16 15:23:23.681 | + echo 'Error on exit'
2016-08-16 15:23:23.681 | Error on exit
2016-08-16 15:23:23.681 | + generate-subunit 1471360443 560 fail
2016-08-16 15:23:23.981 | + [[ -z /opt/stack/logs ]]
2016-08-16 15:23:23.981 | + /opt/stack/devstack/tools/worlddump.py -d /opt/stack/logs
2016-08-16 15:23:24.449 | + exit 1

I have looked for fixes online, there are few categories of answer. 1. If you have stack.sh alread run on your system, you need to remove mysql related packages. 2. Give privileges to user for mysql

But here in my case, there is no mysql installed on my system, no related files present. If I do unstack.sh and stack.sh, this error goes by.

I am working in a scenario where I cannot bear unstack.sh and stack.sh most of the times. Kindly share your suggestions on it.

edit retag flag offensive close merge delete