Switch from MySQL-python to PyMySQL

As discussed in the Liberty Design Summit "Moving apps to Python 3"
cross-project workshop, the way forward in the near future is to
switch to the pure-python PyMySQL library as a default.

https://etherpad.openstack.org/p/liberty-cross-project-python3

Change-Id: Iee61d10981966c7c3f2b14354072ae90755bf181
This commit is contained in:
Jeremy Stanley 2015-05-20 01:03:58 +00:00 committed by Kiall Mac Innes
parent dee085853e
commit 3e241aff2c
4 changed files with 5 additions and 5 deletions

View File

@ -116,7 +116,7 @@ SCRIPT
fedora.vm.network :private_network, ip: "192.168.27.101"
fedora.vm.provision :shell, :privileged => true, :inline => "yum update -y vim-minimal" # RH Bug 1066983
fedora.vm.provision :shell, :privileged => true, :inline => "yum install -y git-core MySQL-python"
fedora.vm.provision :shell, :privileged => true, :inline => "yum install -y git-core"
fedora.vm.provision :shell, :privileged => false, :inline => $script
end

View File

@ -63,7 +63,7 @@ You need to configure PowerDNS to use the MySQL backend.
3. Configure the options for designate-central - specifaclly "connection" to point to your MySQL database::
[backend:powerdns]
connection = mysql://<username>:<password>@<host>:<port>/<dbname>
connection = mysql+pymysql://<username>:<password>@<host>:<port>/<dbname>
4. Setup the database schema.

View File

@ -115,7 +115,7 @@ options = port: 53, host: 127.0.0.1
# SQLAlchemy Pool Manager Cache
#-----------------------
[pool_manager_cache:sqlalchemy]
connection = mysql://root:password@127.0.0.1/designate_pool_manager
connection = mysql+pymysql://root:password@127.0.0.1/designate_pool_manager?charset=utf8
#connection_debug = 100
#connection_trace = False
#sqlite_synchronous = True
@ -132,7 +132,7 @@ connection = mysql://root:password@127.0.0.1/designate_pool_manager
[storage:sqlalchemy]
# Database connection string - to configure options for a given implementation
# like sqlalchemy or other see below
connection = mysql://root:password@127.0.0.1/designate
connection = mysql+pymysql://root:password@127.0.0.1/designate?charset=utf8
#connection_debug = 100
#connection_trace = True
#sqlite_synchronous = True

View File

@ -181,7 +181,7 @@ By default, the MySQL root password for Designate is "password". You can:
* Change the root password to "password"
* If you want your own password, edit the designate.conf file and change any instance of
"mysql://root:password@127.0.0.1/designate" to "mysql://root:YOUR_PASSWORD@127.0.0.1/designate"
"mysql+pymysql://root:password@127.0.0.1/designate?charset=utf8" to "mysql+pymysql://root:YOUR_PASSWORD@127.0.0.1/designate?charset=utf8"
You can change your MySQL password anytime with the following command::