2
votes

I want to contribute to Openstack. Keeping this in mind, I git cloned devstack on virtual machine with Ubuntu 14:0 on Windows XP. After this, I ran ./stack.sh. It was not working. I was not able to launch an instance.I tried deleting the devstack and git cloned again. Even now its not working.

git clone https://github.com/openstack-dev/devstack.git

I get the following error. I am using my computer as an administrator.

sudo mysql -uroot -pa2350bf7c5f41b70a808 -h127.0.0.1 -e 'GRANT ALL PRIVILEGES ON *.* TO '\''root'\''@'\''%'\'' identified by '\''a2350bf7c5f41b70a808'\'';'
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
+ exit_trap
+ local r=1
++ jobs -p
+ jobs=
+ [[ -n '' ]]
+ kill_spinner
+ '[' '!' -z '' ']'
+ [[ 1 -ne 0 ]]
+ echo 'Error on exit'
Error on exit

What is the error and how to overcome the error? I m presuming that the error is due to permission settings.

3

3 Answers

4
votes

Remove mysql and try running script again.

apt-get purge mysql-server
apt-get purge mysql*
rm -rf /var/lib/mysql/ /etc/mysql/

The problem is that devstack installs mysql and set a root password. If you run dev stack again without removing mysql, it won't install mysql again and keeps current installation. Since the devstack script doesn't know old mysql password, the whole thing fails.

2
votes

I was having the same problem when trying to re-install devstack on a VM and was happy to find the answer posted above by Harikrishnan.

I ran into another issue after following his solution: The /var/lib/mysql directory is provided by the 'mariadb-server' package. Removing this directory manually and leaving the mariadb-server package installed results in an error when trying to run stack.sh. Removing both mysql-server and the mariadb-server packages solved the problem for me.

apt-get purge mysql-server mariadb-server
rm -rf /var/lib/mysql/ /etc/mysql/
/opt/stack/stack.sh
0
votes

For encountering this problem follow these steps:

  1. sudo /etc/init.d/mysql stop

  2. mysql -u root mysql

  3. UPDATE user SET Password=PASSWORD('a2350bf7c5f41b70a808') WHERE User='root';

  4. FLUSH PRIVILEGES;

  5. exit;

  6. sudo /etc/init.d/mysql start

  7. Now do mysql -u root -p and enter the password mentioned in step 3.