GBase如何兼容sqlalchemy
GBase版本:Gbase8s_华为鲲鹏
Python版本:2.7.16
pymysql版本:0.9.3
sqlalchemy版本:1.3.1
GBase的访问采用pymysql插件,比如
import pymysql
connetction = pymysql.connect(host=‘localhost’, port=5258, user=‘xxx’, password=‘xxxxx’, db = ‘gbase’, charset=‘utf8mb4’, unix_socket=’/opt/GBase/Server/tmp/gbase.sock’);
而在sqlalchemy的链接为
sql_connection = mysql+pymysql://xxx:xxxxx@xxx.xxx.xxx.xxx:5258/xxx