- 安装mysqlclient
- 简单使用
pip install mysqlclient
libmysqlclient.18.dylib not load
解决:
sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/local/lib/libmysqlclient.18.dylib
from sqlalchemy import create_engine
engine = create_engine('mysql://root:root@localhost/beauty?charset=utf8')
data.to_sql('tick_data', engine)//data自己的数据