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 5.7k 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.
  • jsulmJ jsulm

    @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 last edited by
    #11

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

    jsulmJ 1 Reply Last reply
    0
    • dheerendraD dheerendra

      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 last edited by
      #12

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

      1 Reply Last reply
      0
      • dheerendraD Offline
        dheerendraD Offline
        dheerendra
        Qt Champions 2022
        wrote on 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
        0
        • dheerendraD dheerendra

          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 last edited by
          #14

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

          1 Reply Last reply
          0
          • dheerendraD Offline
            dheerendraD Offline
            dheerendra
            Qt Champions 2022
            wrote on 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
            0
            • T Tonny

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

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on 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
              • dheerendraD dheerendra

                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 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

                jsulmJ 1 Reply Last reply
                0
                • dheerendraD Offline
                  dheerendraD Offline
                  dheerendra
                  Qt Champions 2022
                  wrote on 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
                  0
                  • dheerendraD dheerendra

                    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 last edited by
                    #19

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

                    1 Reply Last reply
                    0
                    • dheerendraD Offline
                      dheerendraD Offline
                      dheerendra
                      Qt Champions 2022
                      wrote on 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

                        @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

                        jsulmJ Offline
                        jsulmJ Offline
                        jsulm
                        Lifetime Qt Champion
                        wrote on 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 last edited by web_betreuer
                          #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