问题:
root@swift:/etc/mysql/mariadb.conf.d# su -s /bin/sh -c "keystone-manage db_sync" keystone2017-05-17 21:38:28.105 5553 WARNING oslo_db.sqlalchemy.engines [-] SQL connection failed. 10 attempts left.2017-05-17 21:38:38.107 5553 WARNING oslo_db.sqlalchemy.engines [-] SQL connection failed. 9 attempts left.2017-05-17 21:38:48.117 5553 WARNING oslo_db.sqlalchemy.engines [-] SQL connection failed. 8 attempts left.2017-05-17 21:38:58.124 5553 WARNING oslo_db.sqlalchemy.engines [-] SQL connection failed. 7 attempts left.2017-05-17 21:39:08.130 5553 WARNING oslo_db.sqlalchemy.engines [-] SQL connection failed. 6 attempts left.2017-05-17 21:39:18.138 5553 WARNING oslo_db.sqlalchemy.engines [-] SQL connection failed. 5 attempts left.2017-05-17 21:39:28.144 5553 WARNING oslo_db.sqlalchemy.engines [-] SQL connection failed. 4 attempts left.2017-05-17 21:39:38.151 5553 WARNING oslo_db.sqlalchemy.engines [-] SQL connection failed. 3 attempts left.2017-05-17 21:39:48.158 5553 WARNING oslo_db.sqlalchemy.engines [-] SQL connection failed. 2 attempts left.2017-05-17 21:39:58.167 5553 WARNING oslo_db.sqlalchemy.engines [-] SQL connection failed. 1 attempts left.2017-05-17 21:40:08.171 5553 CRITICAL keystone [-] DBConnectionError: (pymysql.err.OperationalError) (2003, "Can't connect to MySQL server on 'swift' ([Errno 111] Connection refused)")2017-05-17 21:40:08.171 5553 ERROR keystone Traceback (most recent call last):2017-05-17 21:40:08.171 5553 ERROR keystone File "/usr/bin/keystone-manage", line 10, in2017-05-17 21:40:08.171 5553 ERROR keystone sys.exit(main())2017-05-17 21:40:08.171 5553 ERROR keystone File "/usr/lib/python2.7/dist-packages/keystone/cmd/manage.py", line 47, in main2017-05-17 21:40:08.171 5553 ERROR keystone cli.main(argv=sys.argv, config_files=config_files)2017-05-17 21:40:08.171 5553 ERROR keystone File "/usr/lib/python2.7/dist-packages/keystone/cmd/cli.py", line 1024, in main2017-05-17 21:40:08.171 5553 ERROR keystone CONF.command.cmd_class.main()2017-05-17 21:40:08.171 5553 ERROR keystone File "/usr/lib/python2.7/dist-packages/keystone/cmd/cli.py", line 403, in main2017-05-17 21:40:08.171 5553 ERROR keystone migration_helpers.sync_database_to_version(extension, version)2017-05-17 21:40:08.171 5553 ERROR keystone File "/usr/lib/python2.7/dist-packages/keystone/common/sql/migration_helpers.py", line 210, in sync_database_to_version2017-05-17 21:40:08.171 5553 ERROR keystone _sync_common_repo(vers