Unable to connect to SQL

Discussion in 'Feedback and Suggestions' started by globalkn, Sep 9, 2017.

  1. globalkn

    globalkn New Member

    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hello there,

    I'm having some trouble here, basically I am unable to connect to the SQL server using this "xo6.x10hosting.com". Am i doing anything wrong?
    If so, then what IP should I use?
    I also tried to add the IP in Remote Hosts which was "176.57.188.201" but the result still was same, server responds: Connection to database failed.

    So its like this

    #define SQL_IP "http://xo6.x10hosting.com"
    #define SQL_NAME "******"
    #define SQL_PASSWORD "*******"
    #define SQL_DB "******"
    #endif
    #define SQL_TABLE "******"

    Btw I'm sure that SQL_DB and SQL_TABLE, also SQL_NAME are correctly written, so as password. Its only the IP tho.


    Thanks.
     
    Last edited: Sep 9, 2017
  2. Anna

    Anna I am just me Staff Member

    Messages:
    8,400
    Likes Received:
    241
    Trophy Points:
    63
    For SQL_IP you should have localhost. Having a full weburl won't work in that scenario.

    Remote mysql is not available at all if that is what you are trying to do, it is blocked on firewall level.
     
  3. globalkn

    globalkn New Member

    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    So you mean, use SQL_IP "localhost" only?
     
  4. Anna

    Anna I am just me Staff Member

    Messages:
    8,400
    Likes Received:
    241
    Trophy Points:
    63
  5. globalkn

    globalkn New Member

    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I already tried that too, even my coder said that it won't work and it didn't.

    #define SQL_IP "localhost"
    #define SQL_NAME "globalkn"
    #define SQL_PASSWORD "******"
    #define SQL_DB "globalkn_mod"
    #endif
    #define SQL_TABLE "globalkn_mod"

    SQL_NAME I suppose is same as User.
     
    Last edited: Sep 10, 2017
  6. Anna

    Anna I am just me Staff Member

    Messages:
    8,400
    Likes Received:
    241
    Trophy Points:
    63
    SQL_NAME would be the user you created in the controlpanel and assigned to the database, usually in the form of user_dbname.
     
  7. globalkn

    globalkn New Member

    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    As I mentioned, it didn't work. only writing "localhost" is meaningless.

    Also, by saying "Remote mysql is not available at all" I hope you don't mean like sending queries to SQL and receiving results.
     
    Last edited: Sep 10, 2017
  8. caftpx10

    caftpx10 Well-Known Member

    Messages:
    1,500
    Likes Received:
    108
    Trophy Points:
    63
    By "remote," they mean that only PHP scripts under the same server (including under your account) can connect to the database with the MySQL user you had set up, belonging to the same server. You cannot use remote database management software on your PC to access the database nor can you connect to databases that aren't hosted by that server (in this case, it's restricted to localhost and that only).
     
  9. sobakix2

    sobakix2 New Member

    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    If that 'remote mysql' option was unavailable in the CP, I bet that would have saved folks a lot of head scratching :banghead:
     

Share This Page