Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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?