1. Post #1
    InfernalCookie's Avatar
    December 2010
    700 Posts
    So I'm running a server off my computer and I wanted to make a connection (using tmysql) to a database that I have from purchasing a server off www.xfactorservers.com

    But I have tried every combination I can think of for the connection info but none of them work, I keep getting the error:

    Error connecting to DB: Lost connection to MySQL server at 'reading initial communication packet', system error: 0



    So my question is, what am I supposed to be putting into the following:

    Host - Isn't the host supposed to be the ip in the address bar?

    Username - Is this the username I use to log into my control panel? Or is it the name of the user specifically set to the database I'm connection to?

    Password - Is this the password I use to log into the control panel? Or is it the password for the user specifically set to the database I'm connecting to?

  2. Post #2

    July 2007
    864 Posts
    I've just had that error very recently. As in today, but on my webserver. I just retried, that fixed it?
    Username and Password - IF they're wrong it should give a different error.
    Try mailing(or whatever ticket system) and contact xfactorservers about it.

  3. Post #3
    InfernalCookie's Avatar
    December 2010
    700 Posts
    Ok I'll try asking them about it, but meanwhile can you help clarify what information is supposed to go where?

    So my question is, what am I supposed to be putting into the following:

    Host - Isn't the host supposed to be the ip in the address bar?

    Username - Is this the username I use to log into my control panel? Or is it the name of the user specifically set to the database I'm connection to?

    Password - Is this the password I use to log into the control panel? Or is it the password for the user specifically set to the database I'm connecting to?

  4. Post #4
    Derek_SM's Avatar
    January 2011
    330 Posts
    Ok I'll try asking them about it, but meanwhile can you help clarify what information is supposed to go where?
    The username will be the name of the user specific to the database you're trying to connect to.
    The password will be the password of the user specified to the database you're trying to connect to.

    You will not use your cpanel username and password for that.

    As for the host, if they didn't give you another ip for the database, then try the I.P. in the address bar or try your server's I.P. (without the port of course)

    Oh, and the port will most likely be 3306 unless your host said otherwise.

  5. Post #5
    InfernalCookie's Avatar
    December 2010
    700 Posts
    The username will be the name of the user specific to the database you're trying to connect to.
    The password will be the password of the user specified to the database you're trying to connect to.

    You will not use your cpanel username and password for that.

    As for the host, if they didn't give you another ip for the database, then try the I.P. in the address bar or try your server's I.P. (without the port of course)

    Oh, and the port will most likely be 3306 unless your host said otherwise.
    Okay well for the username for the database is like *****_username, ***** being the username to log into the cpanel.. When putting it into mysql would I use just username or *****_username?

  6. Post #6
    Derek_SM's Avatar
    January 2011
    330 Posts
    *****_username

  7. Post #7

    July 2007
    864 Posts
    If you log in to like.. PHPMyAdmin.. It's the same username and password.

  8. Post #8
    InfernalCookie's Avatar
    December 2010
    700 Posts
    I keep getting an error saying:

    Error connecting to DB: Access denied for user '*****_test'@'ipSOMERANDOMIP.ph.ph.cox.net' (using password: YES)

    What does this mean?? This is what I have for my connection

    tmysql.initialize( host, username, password, database, 3306 )

  9. Post #9
    zzaacckk's Avatar
    June 2009
    2,146 Posts
    Did you add your server to the remote connection whitelist?

  10. Post #10
    InfernalCookie's Avatar
    December 2010
    700 Posts
    fixed it