How to resolve Can't connect to MySQL server on a particular host name in configuring the keystone?
Hello Guys,
I am trying to configure keystone for my swift and i am following this link http://docs.openstack.org/havana/install-guide/install/apt/content/keystone-install.html
As per the second step i have changed my hostname to controller and edited /etc/keystone/keystone.conf and changed the [sql] section as follows.
[sql]
# The SQLAlchemy connection string used to connect to the database
connection = mysql://keystone:xxxxxxx@controller/keystone
Also as per the third step i have deleted keystone.db in /var/lib/keystone/ directory.
and in the fourth step my changes are as follows:
# mysql -u root -p
mysql> CREATE DATABASE keystone;
mysql> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'controller' \
IDENTIFIED BY 'xxxxxxx';
mysql> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' \
IDENTIFIED BY 'xxxxxxx';
After this,when i tried to run # keystone-manage db_sync i am getting the following error:
2014-01-31 22:00:43.789 1966 CRITICAL keystone [-] (OperationalError) (2003, "Can't connect to MySQL server on 'controller' (111)") None None
Could anyone sort it out the source of this issue?
did you change the bind address in my.conf to controller ? Also whether controller is resolvable i.e /etc/hosts has it ?
The following changes in /etc/hosts worked for me, Thanks. 127.0.0.1 controller 127.0.1.1 controller But would it make any trouble if i make connections to sql remotely?
you will not be able to make remote connection.
What should i do to get remote connection?