把
connection = mysql://keystone:KEYSTONE_DBPASS@controller/keystone
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' \
分别改成
connection = mysql://keystone:KEYSTONE_DBPASS@127.0.0.1/keystone
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone’@‘127.0.0.1’ \
之后还是报错
OperationalError: (OperationalError) (2003, "Can't connect to MySQL server on '127.0.0.1' (111)") None None
root@ubuntu:~# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 30
Server version: 5.5.41-MariaDB-1ubuntu0.14.04.1 (Ubuntu)
Copyright (c) 2000, 2014, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
……
MariaDB [(none)]> exit
Bye
root@ubuntu:~# openssl rand -hex 10
……
root@ubuntu:~# apt-get install keystone python-keystoneclient
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
……
Suggested packages:
……
The following NEW packages will be installed:
……
0 upgraded, 61 newly installed, 0 to remove and 0 not upgraded.
Need to get 7,226 kB of archives.
After this operation, 40.9 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.yun-idc.com/ubuntu/ trusty/main librabbitmq1 amd64 0.4.1-1 [35.2 kB]
……
Fetched 7,226 kB in 3min 44s (32.1 kB/s)
Extracting templates from packages: 100%
Selecting previously unselected package librabbitmq1.
(Reading database ... 200465 files and directories currently installed.)
Preparing to unpack .../librabbitmq1_0.4.1-1_amd64.deb ...
Unpacking librabbitmq1 (0.4.1-1) ...
……
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
……
……
2015-03-12 16:01:05.323 13660 WARNING keystone.cli [-] keystone-manage pki_setup is not recommended for production use.
initctl: Unknown job: keystone
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
Processing triggers for ureadahead (0.100.0-16) ...
root@ubuntu:~# apt-get install keystone python-keystoneclient
Reading package lists... Done
Building dependency tree
Reading state information... Done
keystone is already the newest version.
python-keystoneclient is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@ubuntu:~# service keystone start
start: Unknown job: keystone
root@ubuntu:~# emacs /etc/keystone/keystone.conf
No protocol specified
Display :0 unavailable, simulating -nw
root@ubuntu:~# su -s /bin/sh -c "keystone-manage db_sync" keystone
2015-03-12 16:37:03.182 14473 INFO migrate.versioning.api [-] 33 -> 34...
2015-03-12 16:37:03.584 14473 INFO migrate.versioning.api [-] done
2015-03-12 16:37:03.584 14473 INFO migrate.versioning.api [-] 34 -> 35...
2015-03-12 16:37:03.603 14473 INFO migrate.versioning.api [-] done
2015-03-12 16:37:03.604 14473 INFO migrate.versioning.api [-] 35 -> 36...
2015-03-12 16:37:03.618 14473 INFO migrate.versioning.api [-] done
2015-03-12 16:37:03.618 14473 INFO migrate.versioning.api [-] 36 -> 37...
2015-03-12 16:37:03.636 14473 INFO migrate.versioning.api [-] done
2015-03-12 16:37:03.636 14473 INFO migrate.versioning.api [-] 37 -> 38...
2015-03-12 16:37:03.680 14473 INFO migrate.versioning.api [-] done
2015-03-12 16:37:03.680 14473 INFO migrate.versioning.api [-] 38 -> 39...
2015-03-12 16:37:03.731 14473 INFO migrate.versioning.api [-] done
2015-03-12 16:37:03.732 14473 INFO migrate.versioning.api [-] 39 -> 40...
2015-03-12 16:37:03.763 14473 INFO migrate.versioning.api [-] done
2015-03-12 16:37:03.763 14473 INFO migrate.versioning.api [-] 40 -> 41...
2015-03-12 16:37:03.777 14473 INFO migrate.versioning.api [-] done
2015-03-12 16:37:03.778 14473 INFO migrate.versioning.api [-] 41 -> 42...
2015-03-12 16:37:03.809 14473 INFO migrate.versioning.api [-] done
2015-03-12 16:37:03.811 14473 INFO migrate.versioning.api [-] 42 -> 43...
2015-03-12 16:37:03.821 14473 INFO migrate.versioning.api [-] done
2015-03-12 16:37:03.821 14473 INFO migrate.versioning.api [-] 43 -> 44...
2015-03-12 16:37:03.846 14473 INFO migrate.versioning.api [-] done
2015-03-12 16:37:03.846 14473 INFO migrate.versioning.api [-] 44 -> 45...
2015-03-12 16:37:03.850 14473 INFO migrate.versioning.api [-] done
2015-03-12 16:37:03.850 14473 INFO migrate.versioning.api [-] 45 -> 46...
2015-03-12 16:37:03.855 14473 INFO migrate.versioning.api [-] done
2015-03-12 16:37:03.855 14473 INFO migrate.versioning.api [-] 46 -> 47...
2015-03-12 16:37:03.861 14473 INFO migrate.versioning.api [-] done
2015-03-12 16:37:03.861 14473 INFO migrate.versioning.api [-] 47 -> 48...
2015-03-12 16:37:03.866 14473 INFO migrate.versioning.api [-] done
2015-03-12 16:37:03.867 14473 INFO migrate.versioning.api [-] 48 -> 49...
2015-03-12 16:37:03.874 14473 INFO migrate.versioning.api [-] done
2015-03-12 16:37:03.874 14473 INFO migrate.versioning.api [-] 49 -> 50...
2015-03-12 16:37:03.933 14473 INFO migrate.versioning.api [-] done
2015-03-12 16:37:03.933 14473 INFO migrate.versioning.api [-] 50 -> 51...
2015-03-12 16:37:03.954 14473 INFO migrate.versioning.api [-] done
2015-03-12 16:37:03.955 14473 INFO migrate.versioning.api [-] 51 -> 52...
2015-03-12 16:37:03.974 14473 INFO migrate.versioning.api [-] done
2015-03-12 16:37:03.974 14473 INFO migrate.versioning.api [-] 52 -> 53...
2015-03-12 16:37:04.047 14473 INFO migrate.versioning.api [-] done
2015-03-12 16:37:04.048 14473 INFO migrate.versioning.api [-] 53 -> 54...
2015-03-12 16:37:04.071 14473 INFO migrate.versioning.api [-] done
2015-03-12 16:37:04.071 14473 INFO migrate.versioning.api [-] 54 -> 55...
2015-03-12 16:37:04.106 14473 INFO migrate.versioning.api [-] done
2015-03-12 16:37:04.135 14473 INFO migrate.versioning.api [-] 0 -> 1...
2015-03-12 16:37:04.165 14473 INFO migrate.versioning.api [-] done
2015-03-12 16:37:04.166 14473 INFO migrate.versioning.api [-] 1 -> 2...
2015-03-12 16:37:04.203 14473 INFO migrate.versioning.api [-] done
root@ubuntu:~# service keystone restart
stop: Unknown job: keystone
start: Unknown job: keystone