Qt Ubuntu下添加 Mysql 驱动
Building QT Mysql Driver on Ubuntu 16.04 for Qt 5.14 Desktop
k b Uncategorized January 7, 2018 1 Minute
Install dependencies:
libssl-dev (required)
mysql-client
libmysqlclient-dev
libmysql+±dev (check this)
libmysqlcppconn-dev (check this)
sudo apt-get install libssl-dev
sudo apt-get install mysql-client
sudo apt-get install libmysqlclient-dev
sudo apt-get install libmysql+±dev
sudo apt-get install libmysqlcppconn-dev
https://bugreports.qt.io/browse/QTBUG-62078
https://freehealth.io/en/code/buildsystem/qmysql-plugin#troubleshooting
https://forum.qt.io/topic/80882/error-while-compiling-qt-mysql-driver/20
If qtsqldrivers-config.pri is missing:
Go to :
/Qt/5.10.0/Src/qtbase/src/plugins/sqldrivers
Run qmake:
…/…/…/…/…/gcc_64/bin/qmake sqldrivers.pro
Configure summary:
Qt Sql:
DB2 (IBM) ………………………… no
InterBase ………………………… no
MySql ……………………………. yes
OCI (Oracle) ……………………… no
ODBC ……………………………… no
PostgreSQL ………………………… no
SQLite2 …………………………… no
SQLite …………………………… yes
Using system provided SQLite ……… no
TDS (Sybase) ……………………… no
this path for 5.14
/Qt5.14.2/5.14.2/Src/qtbase/src/plugins/sqldrivers$
Then go to:
/Qt/5.10.0/Src/qtbase/src/plugins/sqldrivers/mysql
Run qmake again:
…/…/…/…/…/…/gcc_64/bin/qmake mysql.pro
Run make:
make
make install
本文地址:https://blog.csdn.net/zxcvb036/article/details/107160282
上一篇: MySql总结
下一篇: 牛客SQL实战刷题记录(31-61题)
推荐阅读
-
Linux(Ubuntu)下mysql5.7.17安装配置方法图文教程
-
ubuntu 15.04下mysql开放远程3306端口
-
ubuntu 16.04下mysql5.7.17开放远程3306端口
-
Linux(Ubuntu)下Mysql5.6.28安装配置方法图文教程
-
Ubuntu下MySQL中文乱码的问题解决
-
Ubuntu Server 16.04下mysql8.0安装配置图文教程
-
详解Ubuntu Server下启动/停止/重启MySQL数据库的三种方式
-
ubuntu下磁盘空间不足导致mysql无法启动的解决方法
-
Ubuntu 18.04下mysql 8.0 安装配置方法图文教程
-
Ubuntu16.04 server下配置MySQL,并开启远程连接的方法