cannot connect to mysql in QT 4.7.2
hi
im beginner in QT!!!
and i have a problem with connecting to mysql
i install offline QT and use ubuntu 11.04
i downloaded QT SDK from here:
http://qt.nokia.com/downloads/sdk-li...it-cpp-offline
but it has not QMYSQL driver in defaults!
when run my program, show this error:
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE
i have problems with drivers. my error log tells that i only have QSQLITE driver for databases.
What should I do to configure QMYSQL?
please step by step!!!
Re: cannot connect to mysql in QT 4.7.2
Re: cannot connect to mysql in QT 4.7.2
I have followed that "step-by-step" to try to get the mysql to work but no joy. I've also done what some other post/forum I found by googling: Installing the mysql library from ubuntu repo, and the qtcreator from ubuntu repo aswell. Same problem only if I install from repo the qtcreator don't know what harmattan/simulator is...
Maybe someone here can help me troubleshoot?
I ran the ./configure -qt-sql-mysql -I/usr/include/mysql
I don't know if that is the correct include-path, but these are the headers present in that directory:
dlpt@dlpt:/usr/include/mysql$ ls
Quote:
decimal.h my_dbug.h mysqld_ername.h plugin_ftparser.h
errmsg.h my_dir.h mysqld_error.h plugin.h
keycache.h my_getopt.h mysql_embed.h sql_common.h
m_ctype.h my_global.h mysql.h sql_state.h
m_string.h my_list.h mysql_time.h sslopt-case.h
my_alloc.h my_net.h mysql_version.h sslopt-longopts.h
my_attribute.h my_pthread.h my_sys.h sslopt-vars.h
my_compiler.h mysql my_xml.h typelib.h
my_config.h mysql_com.h plugin_audit.h
I still get the "
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE"- messages from Qtcreator...
so, shooting some questions:
* Is there something I must do more to get mysql to work with Nokia n9 simulator, or on harmattan target?
* What is the name of the file needed for mysql? Got libqsqlmysql.so in various places, /usr/local/Trolltech/Qt-4.8.2/lib is one.
* Is there some way to troubleshoot?
Rgds
Re: cannot connect to mysql in QT 4.7.2