Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Hosting and Servers
  4. Connect to MySQL through localhost ?

Connect to MySQL through localhost ?

Scheduled Pinned Locked Moved Hosting and Servers
databasehelpmysqlcomsysadmin
9 Posts 5 Posters 6 Views 1 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.
  • _ Offline
    _ Offline
    _Flaviu
    wrote on last edited by
    #1

    Hi everybody. I bought a hosting to a server (no matter which are), and there I made a MySQL database ... and I want to connect to this MySQL database, through ODBC. When I tried to connect through ODBC driver GUI, I get [Connection failed. Can't connect to MySQL server on 'mydomain.com'(10060)] error. On server side, I had done everything to be able to connect (add my IP on remote MySQL list, create user, pass, and database, grant all rights to user, etc.). But the guys from hosting said that I will be able to connect on my MySQL DB through localhost .... it is possible to do that ? If yes, how ? Can you help me ? Thank you.

    Kornfeld Eliyahu PeterK L S J 4 Replies Last reply
    0
    • _ _Flaviu

      Hi everybody. I bought a hosting to a server (no matter which are), and there I made a MySQL database ... and I want to connect to this MySQL database, through ODBC. When I tried to connect through ODBC driver GUI, I get [Connection failed. Can't connect to MySQL server on 'mydomain.com'(10060)] error. On server side, I had done everything to be able to connect (add my IP on remote MySQL list, create user, pass, and database, grant all rights to user, etc.). But the guys from hosting said that I will be able to connect on my MySQL DB through localhost .... it is possible to do that ? If yes, how ? Can you help me ? Thank you.

      Kornfeld Eliyahu PeterK Offline
      Kornfeld Eliyahu PeterK Offline
      Kornfeld Eliyahu Peter
      wrote on last edited by
      #2

      You have to check with the hosting services in what way MySQL configured...You have two main options... 1. MySQL accessible only from applications running on the hosted server... 2. MySQL made public and you can use it from the outside world... In my experience it is always the first option you get... But! also in this case you can access your data from outside, by adding a layer - of some API - of software to it...

      Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.

      "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

      _ 1 Reply Last reply
      0
      • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

        You have to check with the hosting services in what way MySQL configured...You have two main options... 1. MySQL accessible only from applications running on the hosted server... 2. MySQL made public and you can use it from the outside world... In my experience it is always the first option you get... But! also in this case you can access your data from outside, by adding a layer - of some API - of software to it...

        Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.

        _ Offline
        _ Offline
        _Flaviu
        wrote on last edited by
        #3

        I doubt I that have these options (1 and 2) on my CPanel ... I have to check it, though ...

        1 Reply Last reply
        0
        • _ _Flaviu

          Hi everybody. I bought a hosting to a server (no matter which are), and there I made a MySQL database ... and I want to connect to this MySQL database, through ODBC. When I tried to connect through ODBC driver GUI, I get [Connection failed. Can't connect to MySQL server on 'mydomain.com'(10060)] error. On server side, I had done everything to be able to connect (add my IP on remote MySQL list, create user, pass, and database, grant all rights to user, etc.). But the guys from hosting said that I will be able to connect on my MySQL DB through localhost .... it is possible to do that ? If yes, how ? Can you help me ? Thank you.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          If it is a hosted database that comes with one of the website-packages, then it won't work. There's a firewall preventing connections from the outside.

          Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

          _ 1 Reply Last reply
          0
          • _ _Flaviu

            Hi everybody. I bought a hosting to a server (no matter which are), and there I made a MySQL database ... and I want to connect to this MySQL database, through ODBC. When I tried to connect through ODBC driver GUI, I get [Connection failed. Can't connect to MySQL server on 'mydomain.com'(10060)] error. On server side, I had done everything to be able to connect (add my IP on remote MySQL list, create user, pass, and database, grant all rights to user, etc.). But the guys from hosting said that I will be able to connect on my MySQL DB through localhost .... it is possible to do that ? If yes, how ? Can you help me ? Thank you.

            S Offline
            S Offline
            Simon_Whale
            wrote on last edited by
            #5

            Can you connect to the database with other than your project? i.e. MySQL workbench or putty?

            Every day, thousands of innocent plants are killed by vegetarians. Help end the violence EAT BACON

            _ 1 Reply Last reply
            0
            • S Simon_Whale

              Can you connect to the database with other than your project? i.e. MySQL workbench or putty?

              Every day, thousands of innocent plants are killed by vegetarians. Help end the violence EAT BACON

              _ Offline
              _ Offline
              _Flaviu
              wrote on last edited by
              #6

              I only have tried to connect to DB by ODBC driver GUI ...

              1 Reply Last reply
              0
              • L Lost User

                If it is a hosted database that comes with one of the website-packages, then it won't work. There's a firewall preventing connections from the outside.

                Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

                _ Offline
                _ Offline
                _Flaviu
                wrote on last edited by
                #7

                I think you are right ...

                1 Reply Last reply
                0
                • _ _Flaviu

                  Hi everybody. I bought a hosting to a server (no matter which are), and there I made a MySQL database ... and I want to connect to this MySQL database, through ODBC. When I tried to connect through ODBC driver GUI, I get [Connection failed. Can't connect to MySQL server on 'mydomain.com'(10060)] error. On server side, I had done everything to be able to connect (add my IP on remote MySQL list, create user, pass, and database, grant all rights to user, etc.). But the guys from hosting said that I will be able to connect on my MySQL DB through localhost .... it is possible to do that ? If yes, how ? Can you help me ? Thank you.

                  J Offline
                  J Offline
                  JMAM
                  wrote on last edited by
                  #8

                  For my experience it is always About your Server IP Whitelists. As i understand your MySQL Database is Hosted somewhere using a Professional hosting company. These companies wont just allow outside connections even you knew your DB login credentials. For what i understand you are trying to host a Database online where you can deploy your project anywhere and use that DB as an online storage. This can be achieve by: 1. Make sure that the PC's IP Addess are registered to your server IP Whitelist so they wont block incoming MYSQL connections from your end. 2. Make sure you are using a Static IP otherwise you will have to re register your public ip to your server every time it changes

                  _ 1 Reply Last reply
                  0
                  • J JMAM

                    For my experience it is always About your Server IP Whitelists. As i understand your MySQL Database is Hosted somewhere using a Professional hosting company. These companies wont just allow outside connections even you knew your DB login credentials. For what i understand you are trying to host a Database online where you can deploy your project anywhere and use that DB as an online storage. This can be achieve by: 1. Make sure that the PC's IP Addess are registered to your server IP Whitelist so they wont block incoming MYSQL connections from your end. 2. Make sure you are using a Static IP otherwise you will have to re register your public ip to your server every time it changes

                    _ Offline
                    _ Offline
                    _Flaviu
                    wrote on last edited by
                    #9

                    "As i understand your MySQL Database is Hosted somewhere using a Professional hosting company. These companies wont just allow outside connections even you knew your DB login credentials" Yes, you are right ... and yes, I already added my IP in the server white list .. not working ! And the solution given by the server administrators was to buy a VPS hosting on their server, or a dedicated server ... for me, in this stage, is not worth it ... I wonder if there exist another workaround ... ?

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups