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

MySQL on CPanel and connection string...

Scheduled Pinned Locked Moved Solved General and Desktop
10 Posts 5 Posters 3.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.
  • U Offline
    U Offline
    U7Development
    wrote on 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

    jsulmJ 1 Reply Last reply
    0
    • U U7Development

      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

      jsulmJ Online
      jsulmJ Online
      jsulm
      Lifetime Qt Champion
      wrote on 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
      1
      • jsulmJ jsulm

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

        U Offline
        U Offline
        U7Development
        wrote on last edited by
        #3

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

        jsulmJ 1 Reply Last reply
        -1
        • U U7Development

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

          jsulmJ Online
          jsulmJ Online
          jsulm
          Lifetime Qt Champion
          wrote on 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
          3
          • jsulmJ jsulm

            @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 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
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on 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

              JonBJ 1 Reply Last reply
              0
              • SGaistS SGaist

                Hi,

                What exact error do you get ?

                JonBJ Offline
                JonBJ Offline
                JonB
                wrote on 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
                0
                • JonBJ JonB

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

                      You've posted too much private information bro!

                      1 Reply Last reply
                      2

                      • Login

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