connect mysql qt creator 6.8.0
-
Well, I've already consulted the forum, and I saw that many people in the past had difficulty connecting MySQL to QT Creator, and I did too. Could someone help me? I don't understand anything about the platform, it's new to me, but I've been a programmer for a few years and I use Windows 64. I have version 6.8.0, I have installed C:\Program Files\MySQL\MySQL Connector C 6.1, I don't know if it helps, and I work as a local server with XAMPP, I also have Visual Studio 2022 Community installed. Thank you.
-
At https://doc.qt.io/qt-6/sql-driver.html you can read how to build the Qt MySQL plugin.
-
Hello, My qt does not have the command prompt, I installed all available versions, everything, and it does not have the command prompt.
You are using Visual Studio and the Microsoft tool chain. If my memory serves, the Microsoft tools installs a Start menu shortcut to launch a command prompt set up for those tools.
- Open the Microsoft VS developer command prompt (Use the Microsoft C++ toolset from the command line)
- Run
cl.exe(Microsoft's compiler) to test the environment is OK. - Execute
{qtdir}\6.8.0\msvc\bin\qtenv2.batto add Qt-specific elements to the environment - Run
qmake -vto check that you have the correct Qt environment
-
Quando eu executo esse comondo: C:\Qt\6.8.0\Src\configure.bat -sql-mysql -- -DMySQL_INCLUDE_DIR="C:\Program Files\MySQL\MySQL Connector C 6.1\include" -DMySQL_LIBRARY="C:\Program Files\MySQL\MySQL Connector C 6.1\lib\libmysql.lib"
Ele não reconhece esse arquivo: configure.bat, mas ele existe na pasta. -
Please write in English or use the appropriate subforum
-
Sorry. Could someone help me? I don't understand anything about the platform, it's new to me, but I've been a programmer for a few years and I use Windows 64. I have version 6.8.0, I have installed C:\Program Files\MySQL\MySQL Connector C 6.1, I don't know if it helps, and I work as a local server with XAMPP, I also have Visual Studio 2022 Community installed. Thanks.
-
-
Quando eu executo esse comondo: C:\Qt\6.8.0\Src\configure.bat -sql-mysql -- -DMySQL_INCLUDE_DIR="C:\Program Files\MySQL\MySQL Connector C 6.1\include" -DMySQL_LIBRARY="C:\Program Files\MySQL\MySQL Connector C 6.1\lib\libmysql.lib"
Ele não reconhece esse arquivo: configure.bat, mas ele existe na pasta.This:
C:\Qt\6.8.0\Src\configure.bat -sql-mysql -- -DMySQL_INCLUDE_DIR="C:\Program Files\MySQL\MySQL Connector C 6.1\include" -DMySQL_LIBRARY="C:\Program Files\MySQL\MySQL Connector C 6.1\lib\libmysql.lib"
looks like you are trying to configure to build all of Qt, not just the Mysql/Mariadb driver. The instructions are here and do not look like what you have done.
-
It only worked partly because it created a path:
C:\Qt\6.7.2\msvc2019_64\plugins\sqldrivers
The drive: qsqlmysql.dll
It is only connecting in release but not in debug.
Could you please continue helping me?@Jeferson said in connect mysql qt creator 6.8.0:
It is only connecting in release but not in debug.
Because you only built the release plugin.
-
It only worked partly because it created a path:
C:\Qt\6.7.2\msvc2019_64\plugins\sqldrivers
The drive: qsqlmysql.dll
It is only connecting in release but not in debug.
Could you please continue helping me?