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. Qt Remote Database connection
Forum Updated to NodeBB v4.3 + New Features

Qt Remote Database connection

Scheduled Pinned Locked Moved Unsolved General and Desktop
22 Posts 6 Posters 6.1k Views 2 Watching
  • 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.
  • J jsulm
    4 Dec 2018, 11:38

    @Tonny said in Qt Remote Database connection:

    But when i connecting the localhost it does not show any error

    And does it connect then?
    Did you try to connect using MySQL client?

    T Offline
    T Offline
    Tonny
    wrote on 5 Dec 2018, 05:56 last edited by
    #11

    @jsulm mysql client?Please give the procedure to connect it.

    J 1 Reply Last reply 5 Dec 2018, 08:07
    0
    • D dheerendra
      5 Dec 2018, 05:54

      112.17.98.18 is this in LAN ? Hope there is no firewall etc between your box and 112.17.98.18.
      Since telnet is not able to connect to port 111 are you sure that SQL is running at the port 111 ?

      T Offline
      T Offline
      Tonny
      wrote on 5 Dec 2018, 06:10 last edited by
      #12

      @dheerendra
      Sir SQL is not running in the port 111.Sql port is 3306 ..

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dheerendra
        Qt Champions 2022
        wrote on 5 Dec 2018, 06:12 last edited by
        #13

        OK can you check telnet 112.17.98.18 3306 ? Does it work ? If it work, atleast DB is up at that port.

        Dheerendra
        @Community Service
        Certified Qt Specialist
        http://www.pthinks.com

        T 1 Reply Last reply 5 Dec 2018, 06:30
        0
        • D dheerendra
          5 Dec 2018, 06:12

          OK can you check telnet 112.17.98.18 3306 ? Does it work ? If it work, atleast DB is up at that port.

          T Offline
          T Offline
          Tonny
          wrote on 5 Dec 2018, 06:30 last edited by
          #14

          @dheerendra sir it shows telnet: Unable to connect to remote host: Connection refused

          1 Reply Last reply
          0
          • D Offline
            D Offline
            dheerendra
            Qt Champions 2022
            wrote on 5 Dec 2018, 06:54 last edited by
            #15

            If you have access to the DB Server box, can you login to the system. In same system can you try to do telnet <IP> Port#. Just check the configuration of the remote sql server. Is it configured to listen for network connections also ?

            Dheerendra
            @Community Service
            Certified Qt Specialist
            http://www.pthinks.com

            T 1 Reply Last reply 6 Dec 2018, 08:15
            0
            • T Tonny
              5 Dec 2018, 05:56

              @jsulm mysql client?Please give the procedure to connect it.

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 5 Dec 2018, 08:07 last edited by
              #16

              @Tonny said in Qt Remote Database connection:

              mysql client?Please give the procedure to connect it.

              https://dev.mysql.com/doc/refman/8.0/en/mysql.html

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • D dheerendra
                5 Dec 2018, 06:54

                If you have access to the DB Server box, can you login to the system. In same system can you try to do telnet <IP> Port#. Just check the configuration of the remote sql server. Is it configured to listen for network connections also ?

                T Offline
                T Offline
                Tonny
                wrote on 6 Dec 2018, 08:15 last edited by
                #17

                @dheerendra Sir error solved.
                Sir can you please tell me how to sent values through http protocol using qt creator in the REST API
                please?Is there any solution for that sir

                J 1 Reply Last reply 6 Dec 2018, 09:02
                0
                • D Offline
                  D Offline
                  dheerendra
                  Qt Champions 2022
                  wrote on 6 Dec 2018, 08:17 last edited by
                  #18

                  What was the issue ? Please provide the details here. It helps others. You can move the issue to SOLVED state.

                  Dheerendra
                  @Community Service
                  Certified Qt Specialist
                  http://www.pthinks.com

                  T 1 Reply Last reply 6 Dec 2018, 08:45
                  0
                  • D dheerendra
                    6 Dec 2018, 08:17

                    What was the issue ? Please provide the details here. It helps others. You can move the issue to SOLVED state.

                    T Offline
                    T Offline
                    Tonny
                    wrote on 6 Dec 2018, 08:45 last edited by
                    #19

                    @dheerendra bind address commented. it was 127.0.0.1 (/etc/mysql/mysql.cnf);

                    1 Reply Last reply
                    0
                    • D Offline
                      D Offline
                      dheerendra
                      Qt Champions 2022
                      wrote on 6 Dec 2018, 08:52 last edited by
                      #20

                      Your server was configured to listen only for local IP address. You tried to connect to server remotely. This was the issue.

                      Dheerendra
                      @Community Service
                      Certified Qt Specialist
                      http://www.pthinks.com

                      1 Reply Last reply
                      0
                      • T Tonny
                        6 Dec 2018, 08:15

                        @dheerendra Sir error solved.
                        Sir can you please tell me how to sent values through http protocol using qt creator in the REST API
                        please?Is there any solution for that sir

                        J Offline
                        J Offline
                        jsulm
                        Lifetime Qt Champion
                        wrote on 6 Dec 2018, 09:02 last edited by
                        #21

                        @Tonny said in Qt Remote Database connection:

                        Sir can you please tell me how to sent values through http protocol using qt creator in the REST API

                        It's Qt not QtCreator. QtCreator is an IDE.
                        See https://doc.qt.io/qt-5.11/qtnetwork-programming.html

                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        3
                        • W Offline
                          W Offline
                          web_betreuer
                          wrote on 6 Dec 2021, 14:53 last edited by web_betreuer 12 Jun 2021, 14:54
                          #22

                          Mysql or mariadb listen by default to the loopback address 127.0.0.1
                          you can change this values to the real local networkaddress in
                          /etc/mysql/ mysqld.cnf

                          bind-address = 192.178.xx.xx
                          mysqlx-bind-address = 192.178.xx.xx

                          restart the sql.
                          that's it

                          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