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. MySQL on CPanel and connection string...
Forum Updated to NodeBB v4.3 + New Features

MySQL on CPanel and connection string...

Scheduled Pinned Locked Moved Solved General and Desktop
10 Posts 5 Posters 3.5k 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.
  • U Offline
    U Offline
    U7Development
    wrote on 12 Oct 2020, 21:36 last edited by
    #1

    Hi!. first of all, this is not Qt framework related so please excuse me...

    Has someone managed to connect to a CPanel MySql Database ?
    I don't get it.. I don't know what is the domain name and port... it is using phpMyAdmin.

    I tried to use:

    QString odbc_cfg = "Server=u7.cl:3306;"
                          "Uid=u7cl_master;"                
                          "Pwd=$$Mas7eR$$;"            
                          "Database=u7cl_elearn;"
                          "MULTI_HOSTS=1";
    

    with no success... Error: Can't connect MySQL Server on u7.cl

    J 1 Reply Last reply 13 Oct 2020, 04:27
    0
    • U U7Development
      12 Oct 2020, 21:36

      Hi!. first of all, this is not Qt framework related so please excuse me...

      Has someone managed to connect to a CPanel MySql Database ?
      I don't get it.. I don't know what is the domain name and port... it is using phpMyAdmin.

      I tried to use:

      QString odbc_cfg = "Server=u7.cl:3306;"
                            "Uid=u7cl_master;"                
                            "Pwd=$$Mas7eR$$;"            
                            "Database=u7cl_elearn;"
                            "MULTI_HOSTS=1";
      

      with no success... Error: Can't connect MySQL Server on u7.cl

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 13 Oct 2020, 04:27 last edited by
      #2

      @U7Development I hope this connection string does not contain real credentials...

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

      U 1 Reply Last reply 13 Oct 2020, 12:53
      1
      • J jsulm
        13 Oct 2020, 04:27

        @U7Development I hope this connection string does not contain real credentials...

        U Offline
        U Offline
        U7Development
        wrote on 13 Oct 2020, 12:53 last edited by
        #3

        @jsulm oops they are... By the way I trust you

        J 1 Reply Last reply 13 Oct 2020, 12:55
        -1
        • U U7Development
          13 Oct 2020, 12:53

          @jsulm oops they are... By the way I trust you

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 13 Oct 2020, 12:55 last edited by
          #4

          @U7Development You should not :-) You should not trust anybody on the Internet.
          How do you actually connect? Can you show the code? Do you have proper error handling?

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

          U 1 Reply Last reply 13 Oct 2020, 15:34
          3
          • J jsulm
            13 Oct 2020, 12:55

            @U7Development You should not :-) You should not trust anybody on the Internet.
            How do you actually connect? Can you show the code? Do you have proper error handling?

            U Offline
            U Offline
            U7Development
            wrote on 13 Oct 2020, 15:34 last edited by
            #5

            @jsulm thanks so much for that... indeed you are right, but you need to know that I would never show credentials for real company, the above credentials are test based.. if someone get connected, there will be nothing to explore..

            This is the string for connection:

            QString odbc_cfg = "Server=u7.cl:3306;"
                                  "Uid=u7cl_master;"                
                                  "Pwd=$$Mas7eR$$;"            
                                  "Database=u7cl_elearn;"
                                  "MULTI_HOSTS=1";
            

            Password and UID is fine, but this DB is hosted on a Web Hosting using CPanel... so I really don't know what is the server name for it...

            For instance, previously I have used a dedicated server for this, this server has a dynamic dns service so I login using it and respective port... on CPanel I have no idea...

            Thanks again

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 13 Oct 2020, 18:07 last edited by
              #6

              Hi,

              What exact error do you get ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              J 1 Reply Last reply 13 Oct 2020, 18:10
              0
              • S SGaist
                13 Oct 2020, 18:07

                Hi,

                What exact error do you get ?

                J Offline
                J Offline
                JonB
                wrote on 13 Oct 2020, 18:10 last edited by JonB
                #7

                @SGaist
                He originally said:

                Error: Can't connect MySQL Server on u7.cl

                and also

                so I really don't know what is the server name for it...

                So where does he get his Server=u7.cl:3306; from? :)

                U 1 Reply Last reply 13 Oct 2020, 19:47
                0
                • J JonB
                  13 Oct 2020, 18:10

                  @SGaist
                  He originally said:

                  Error: Can't connect MySQL Server on u7.cl

                  and also

                  so I really don't know what is the server name for it...

                  So where does he get his Server=u7.cl:3306; from? :)

                  U Offline
                  U Offline
                  U7Development
                  wrote on 13 Oct 2020, 19:47 last edited by
                  #8

                  @JonB That is my web site where CPanel is..

                  1 Reply Last reply
                  0
                  • U Offline
                    U Offline
                    U7Development
                    wrote on 14 Oct 2020, 01:28 last edited by U7Development
                    #9

                    I have created an account on mariaclusters.com it uses phpMyAdmin too...

                    alt text

                    On the top center of the screen there is an url with a port number..

                    I tried those values on my connection string but still won't connect..

                    QString odbc_cfg = "Server=mariadb-13914-db.mariadb-13914:13952;"
                                          "Uid=master;"                
                                          "Pwd=$$Mas7eR$$;"            
                                          "Database=dbelearn;"
                                          "MULTI_HOSTS=1";
                    

                    **Update !:
                    Now i managed to connect... the server was:
                    mariadb-13914-0.cloudclusters.net

                    Thanks for the help!**

                    1 Reply Last reply
                    0
                    • B Offline
                      B Offline
                      Bonnie
                      wrote on 14 Oct 2020, 01:47 last edited by
                      #10

                      You've posted too much private information bro!

                      1 Reply Last reply
                      2

                      10/10

                      14 Oct 2020, 01:47

                      • Login

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