Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Old protocol in mysql
QtWS25 Last Chance

Old protocol in mysql

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 2.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hmartinez
    wrote on last edited by
    #1

    Hello,

    I am facing a problem when trying to connect from Qt to a database using QMYSQL driver. The connection reports an error:

    Failed to connect to db. "Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled) QMYSQL: Unable to connect"

    It also appears when using MySQL Workbench. However, I have seen that this error doesn't appear if I add useLegacyAuth=1 to the options of the Workbench connection. Is there a way to set the same option in the Qt code? Or is there any other way to solve this problem?

    I am using Qt 5.1.1 and MySQL Connector C 6.1. The database server is using MySQL 5.1.70-cll.

    Any tip or help would be appreciated.

    Thank you in advance.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mcosta
      wrote on last edited by
      #2

      Hi,

      I think your QMYSQL plugin was built against an OLD libmysqlclient library.
      Have you tried to use a newer one?

      Once your problem is solved don't forget to:

      • Mark the thread as SOLVED using the Topic Tool menu
      • Vote up the answer(s) that helped you to solve the issue

      You can embed images using (http://imgur.com/) or (http://postimage.org/)

      1 Reply Last reply
      0
      • H Offline
        H Offline
        hmartinez
        wrote on last edited by
        #3

        Hello,

        thank you for your reply. Actually I don't know how to check that. I am new to MySQL and I have compiled the QMYSQL driver with the latest "MySQL Connector" available in their website. For this reason, I was thinking I was using the latest version, but maybe there is something I am missing in between. Could you please tell me how to check the version of libmysqlclient?

        Thank you again.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mcosta
          wrote on last edited by
          #4

          Are you using Windows or Linux?

          Once your problem is solved don't forget to:

          • Mark the thread as SOLVED using the Topic Tool menu
          • Vote up the answer(s) that helped you to solve the issue

          You can embed images using (http://imgur.com/) or (http://postimage.org/)

          1 Reply Last reply
          0
          • H Offline
            H Offline
            hmartinez
            wrote on last edited by
            #5

            Sorry, I forgot to mention that. I am using Windows 7 and QtCreator.

            1 Reply Last reply
            0
            • C Offline
              C Offline
              certwell
              wrote on last edited by
              #6

              I have the same problem but am using QT5.2. The code works fine when I am testing against a local test database, but fails when I try to run against the live database operated by my ISP who is running the server using MySQL 5.0 which does not support Secure_auth. Since Workbench can be set to run the old connection method surely it should be possible to set the QT plugin similarly, only I can't see how.

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved