Still did not work. Looks like no table exists in keystone DB, but the 
following command did not throw out any error.

su -s /bin/sh -c "keystone-manage db_sync" keystone

[root@controller ~]# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 10.1.18-MariaDB MariaDB Server

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'controller' 
IDENTIFIED BY 'XXXXXXXX';
Query OK, 0 rows affected (0.01 sec)

MariaDB [(none)]> exit

[root@controller ~]# su - admin
上一次登录:四 12月 29 00:23:04 CST 2016pts/0 上
[admin@controller ~]$ export OS_USERNAME=admin
[admin@controller ~]$ export OS_PASSWORD=XXXXXXXX
[admin@controller ~]$ export OS_PROJECT_NAME=admin
[admin@controller ~]$ export OS_USER_DOMAIN_NAME=default
[admin@controller ~]$ export OS_PROJECT_DOMAIN_NAME=default
[admin@controller ~]$ export OS_AUTH_URL=http://controller:35357/v3
[admin@controller ~]$ export OS_IDENTITY_API_VERSION=3
[admin@controller ~]$ openstack project create --domain default --description 
"Service Project" service
An unexpected error prevented the server from fulfilling your request. (HTTP 
500) (Request-ID: req-1350a2a8-8ad9-4f45-9c1a-3d844cceee31)
[admin@controller ~]$ export OS_PROJECT_NAME=admin
[admin@controller ~]$ export OS_USER_DOMAIN_NAME=default
[admin@controller ~]$ export OS_PROJECT_DOMAIN_NAME=default
[admin@controller ~]$ export OS_AUTH_URL=http://controller:35357/v3
[admin@controller ~]$ export OS_IDENTITY_API_VERSION=3
[admin@controller ~]$ openstack project create --domain default --description 
"Service Project" service
An unexpected error prevented the server from fulfilling your request. (HTTP 
500) (Request-ID: req-1350a2a8-8ad9-4f45-9c1a-3d844cceee31)
MariaDB [(none)]> use keystone
Database changed
MariaDB [keystone]> select Host,User from user where User='keystone';
ERROR 1146 (42S02): Table 'keystone.user' doesn't exist
MariaDB [keystone]>

MariaDB [keystone]> select Host,Db,User from db where User='keystone';
ERROR 1146 (42S02): Table 'keystone.db' doesn't exist

MariaDB [keystone]> show tables;
Empty set (0.00 sec)



====================

=====================
董 建 华
地址:杭州滨江区南环路3766号新世纪办公楼
邮编:310053
手机:13857132818
总机:0571-28996000
传真:0571-28996001
热线:4006728686
网址:www.ahope.com.cn
Email:[email protected]
 
发件人: Turbo Fredriksson
发送时间: 2016-12-29 01:03
收件人: [email protected]
抄送: openstack
主题: Re: [Openstack] 回复: keystone fail
On 28 Dec 2016, at 16:35, [email protected] wrote:
 
> 2016-12-29 00:27:13.006 1825 ERROR keystone.common.wsgi OperationalError: 
> (pymysql.err.OperationalError) (1045, u"Access denied for user 
> 'keystone'@'controller' (using password: YES)")
 
You might not have created the user correctly, OR not given it the correct
access. As in, you might have allowed “keystone@localhost”, but not
“keystone@controller”.
 
Look at the ‘mysql’ database:
 
select Host,User from user where User='keystone’;
select Host,Db,User from db where User='keystone’;
 
_______________________________________________
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to     : [email protected]
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack

Reply via email to