Results 1 to 20 of 21

Thread: Error connecting to MySQL

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Error connecting to MySQL

    Quote Originally Posted by probine
    Do I need something else ? Where can I find the mysql-libs for FC4 ?
    It's probably a part of other packages. If you have mysql-devel, then it should be already installed.

    What does this output?
    sh Code:
    1. $ locate mysql.h
    2. $ locate libmysqlclient
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Jan 2006
    Posts
    185
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Error connecting to MySQL

    This is the output of both:

    [root@dhcp-57106 Qt-4.1.0]# locate mysql.h
    /usr/share/apps/quanta/doc/php/ref.mysql.html
    /usr/include/mysql/mysql.h
    /usr/local/Trolltech/Qt-4.1.0/src/sql/drivers/mysql/qsql_mysql.h
    /usr/local/Trolltech/Qt-4.1.0/include/Qt/qsql_mysql.h
    /usr/local/Trolltech/Qt-4.1.0/include/QtSql/qsql_mysql.h
    /home/santiago/programs/qt/src/sql/drivers/mysql/qsql_mysql.h
    /home/santiago/programs/qt/include/Qt/qsql_mysql.h
    /home/santiago/programs/qt/include/QtSql/qsql_mysql.h

    [root@dhcp-57106 Qt-4.1.0]# locate libmysqlclient
    /usr/lib/mysql/libmysqlclient_r.so.10.0.0
    /usr/lib/mysql/libmysqlclient_r.so
    /usr/lib/mysql/libmysqlclient.a
    /usr/lib/mysql/libmysqlclient.so.10.0.0
    /usr/lib/mysql/libmysqlclient.so.14
    /usr/lib/mysql/libmysqlclient_r.so.14.0.0
    /usr/lib/mysql/libmysqlclient.so.10
    /usr/lib/mysql/libmysqlclient_r.so.14
    /usr/lib/mysql/libmysqlclient.so.14.0.0
    /usr/lib/mysql/libmysqlclient_r.a
    /usr/lib/mysql/libmysqlclient.so
    /usr/lib/mysql/libmysqlclient_r.so.10

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Error connecting to MySQL

    Then you have to add:
    Qt Code:
    1. -I /usr/include/mysql/ -L /usr/lib/mysql/
    To copy to clipboard, switch view to plain text mode 
    to configure options.

  4. #4
    Join Date
    Jan 2006
    Posts
    185
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Error connecting to MySQL

    After configuring everything with the qt plugin as:

    ./configure -plugin-sql-mysql -I /usr/include/mysql/ -L /usr/lib/mysql/

    Everything went fine, but according to the documentation I should then type:

    make sub-plugins

    But, I get this error:

    [root@dhcp-57106 qt]# make sub-plugins
    make: *** No rule to make target `sub-plugins'. Stop.
    [root@dhcp-57106 qt]#

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Error connecting to MySQL

    Try:
    sh Code:
    1. $ cd $QTDIR/src
    2. $ make sub-plugins
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. How to use static mysql plugin
    By khikho in forum Qt Programming
    Replies: 7
    Last Post: 19th January 2009, 21:44
  2. mysql configuration with qt
    By bala in forum Installation and Deployment
    Replies: 3
    Last Post: 6th November 2007, 11:02
  3. qt4.3.1 mysql problem
    By twells55555 in forum Qt Programming
    Replies: 5
    Last Post: 8th October 2007, 21:26
  4. MySQL starting problem
    By shamik in forum General Discussion
    Replies: 5
    Last Post: 25th April 2007, 07:20
  5. Qt 4.1.4 & Mysql 5 on Linux x64
    By bothapn in forum Installation and Deployment
    Replies: 7
    Last Post: 4th August 2006, 13:23

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.