Add pymysql for database connection

Change-Id: I2f7e3d47f802cf948934cef0c0bb7980e71cdf79
This commit is contained in:
caoyuan 2018-04-24 23:09:09 +08:00
parent 889feb07dd
commit b42e5b7d4d
2 changed files with 4 additions and 4 deletions

View File

@ -117,7 +117,7 @@ Edit the ``/etc/cinder/cinder.conf`` file. For example, on a RHEL-based system:
nfs_mount_options = v3
[database]
sql_connection = mysql://cinder:CINDER_DBPASS@10.0.0.11/cinder
connection = mysql+pymysql://cinder:CINDER_DBPASS@10.0.0.11/cinder
max_retries = -1
[keystone_authtoken]
@ -150,7 +150,7 @@ be filled in for you, resulting in a shorter configuration file:
:linenos:
# We have to use MySQL connection to store data:
sql_connection = mysql://cinder:CINDER_DBPASS@10.0.0.11/cinder
connection = mysql+pymysql://cinder:CINDER_DBPASS@10.0.0.11/cinder
# Alternatively, you can switch to pymysql,
# a new Python 3 compatible library and use
# sql_connection = mysql+pymysql://cinder:CINDER_DBPASS@10.0.0.11/cinder

View File

@ -117,7 +117,7 @@ Edit the ``/etc/cinder/cinder.conf`` file. For example, on a RHEL-based system:
nfs_mount_options = v3
[database]
connection = mysql://cinder:CINDER_DBPASS@10.0.0.11/cinder
connection = mysql+pymysql://cinder:CINDER_DBPASS@10.0.0.11/cinder
max_retries = -1
[keystone_authtoken]
@ -150,7 +150,7 @@ be filled in for you, resulting in a shorter configuration file:
:linenos:
# We have to use MySQL connection to store data:
connection = mysql://cinder:CINDER_DBPASS@10.0.0.11/cinder
connection = mysql+pymysql://cinder:CINDER_DBPASS@10.0.0.11/cinder
# Alternatively, you can switch to pymysql,
# a new Python 3 compatible library and use
# connection = mysql+pymysql://cinder:CINDER_DBPASS@10.0.0.11/cinder