Announcement

Collapse
No announcement yet.

Connecting to remote database

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Connecting to remote database

    Hello,

    I've put a site which needs to connect to a remote database. I have all the credentials, the ip addr, and the port number. I'm using PEAR:B. From my local server (ubuntu, php 5.2.4, mysql 5.0.5) I have no problem connecting to the base. From the live site, however, it doesn't fly.

    I can ping the database host's ip from my local setup but if I go to the cpanel's network tools and type in the same ip I get an "invalid zone" result.

    Any ideas on that?

  • #2
    Hi Henri,

    You will need to add the IP of your database host in allowed sql hosts from your cpanel control panel. You can locate this option from Databases >> Remote MySQL section of your cpanel control panel. Our server won't allow any remote database connection until and unless you allow the IP of remote database server from your cpanel control panel.
    eUKhost - eNlight Cloud Hosting || eUKhost Knowledgebase
    Toll Free : 0808 262 0255 || Skype : mark_ducadi

    Comment


    • #3
      Thanks

      I went to remote database and added the ip to the access keys. Still, it fails to connect. Even if I add the port. He's part of what it spits out:

      DB_Error Object
      (
      [error_message_prefix] =>
      [mode] => 1
      [level] => 1024
      [code] => -24
      [message] => DB Error: connect failed
      [userinfo] => [nativecode=mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'xx.xxx.xx.xx' (4)] ** mysql://mysql://dbuser:[email protected]ort/dbname
      [backtrace] => Array
      (
      [0] => Array
      (
      [file] => /home/cfpnfr/public_html/assets/php/DB.php
      [line] => 749
      [function] => PEAR_Error
      [class] => PEAR_Error
      [type] => ->
      [args] => Array
      (
      [0] => DB Error: connect failed
      [1] => -24
      [2] => 1
      [3] => 1024
      [4] => [nativecode=mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'xx.xxx.xx.xx' (4)]
      )

      )
      ...

      Comment


      • #4
        The site his cfpn.fr. I have my own site at henribaeyens.com. Both hosted by eukhost. I have a subdomain (clients.henribaeyens.com, the access of which is protected) where I have uploaded the cfpn site preview for my client. Well, even from there, the connection to the remote database occurs flawlessly WITHOUT my having to change anything in databases | remote mysql

        So what am I missing?

        Comment


        • #5
          Hi Henri,

          Please initiate a livechat session from eUKhost Helpdesk :: Shared Reseller VPS Dedicated Server Hosting Support and communicate with one of our technical support staff to get this sorted. We need to check the logs on server simultaneously when you attempt to connect to the remote mysql database, this is only possible when you contact us on livechat and allow us to check logs at the same time.
          eUKhost - eNlight Cloud Hosting || eUKhost Knowledgebase
          Toll Free : 0808 262 0255 || Skype : mark_ducadi

          Comment


          • #6
            well, I've sent a request.

            would it be possible to do that via skype?

            Henri

            Comment


            • #7
              Originally posted by henri.bae View Post
              well, I've sent a request.

              would it be possible to do that via skype?

              Henri
              Hi Henri,

              Our livechat is similar to Skype and you will like it once you try our livechat support.

              You can directly start a chat from our homepage. Our technical team hasn't got Skype or any other messenger on their computers and they can communicate with customers on phone, livechat or helpdesk only.
              eUKhost - eNlight Cloud Hosting || eUKhost Knowledgebase
              Toll Free : 0808 262 0255 || Skype : mark_ducadi

              Comment


              • #8
                well, the problem seems to be solved now: the connection succeeds.

                I had no clue whence to access your livechat feature until I noticed that the home page banner was a link to it. That'll be for next time.


                Thanks for the quick resolution of that matter.

                Regards

                Comment


                • #9
                  Originally posted by henri.bae View Post
                  well, the problem seems to be solved now: the connection succeeds.

                  I had no clue whence to access your livechat feature until I noticed that the home page banner was a link to it. That'll be for next time.


                  Thanks for the quick resolution of that matter.

                  Regards
                  Please feel free to contact our livechat support staff directly if you need quick resolution for any technical problem. You are most welcome to post your problems here if you can wait for couple of hours for our response.
                  eUKhost - eNlight Cloud Hosting || eUKhost Knowledgebase
                  Toll Free : 0808 262 0255 || Skype : mark_ducadi

                  Comment


                  • #10
                    try this..

                    Myconnection.ConnectionString = "Network Library=DBMSSOCN;" & _
                    "Data Source=xxx.xxx.xxx.xxx,1433;" & _
                    "Initial Catalog=myDatabaseName;" & _
                    "User ID=myUsername;" & _
                    "Pas sword=myPassword"
                    Where:
                    - "Network Library=DBMSSOCN" tells SqlConnection to use TCP/IP
                    - xxx.xxx.xxx.xxx is an IP address.
                    - 1433 is the default port number for SQL Server.


                    Comment


                    • #11
                      you guys rock, thanks for the great help

                      Comment

                      Working...
                      X