Closed Thread
Results 1 to 4 of 4

Thread: Lost connection to MySQL server at 'reading initial communication packet'

  1. #1
    dhennen is offline x10Hosting Member dhennen is an unknown quantity at this point
    Join Date
    Nov 2009
    Posts
    13

    Lost connection to MySQL server at 'reading initial communication packet'

    Hi,
    I've searched the forum for this and found this question asked before but never seen it with any replies. I hope I fare better:

    I have a MySQL database on my account (upy844.x10hosting.com/MagIndex), and some PHP programs that try to access it. Unfortunately, when they try to connect it doesn't work.

    This line of code:
    $conn = mysql_connect("Localhost", "jomocha", "-censored-") or die(mysql_error());

    produces this error:
    Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 111 in /home/shaggy/public_html/MagIndex/ArtFind.php on line 6
    Lost connection to MySQL server at 'reading initial communication packet', system error: 111

    Thanks,
    Don

  2. #2
    Anna's Avatar
    Anna is offline I am just me Anna is a name known to allAnna is a name known to all
    Join Date
    Aug 2007
    Location
    Sweden
    Posts
    6,569

    Re: Lost connection to MySQL server at 'reading initial communication packet'

    first, try using all lowercase for the host: localhost

    secondly, to note that databases, as well as databases users, automatically gets prefixed with your cPanel username, like: cpanelname_databasename and cpanelname_databaseuser, given that jomocha is not correct username in your code.
    Do you have trouble reaching your site?
    Check here first: News and Announcements


    Don't forget that x10hosting has an irc server as well. Come and join the fun
    server: irc.x10hosting.com, main channel: #x10hosting
    There's a lot helpful users there if need help building your site

  3. #3
    dhennen is offline x10Hosting Member dhennen is an unknown quantity at this point
    Join Date
    Nov 2009
    Posts
    13

    Re: Lost connection to MySQL server at 'reading initial communication packet'

    Thanks, Anna! You hit the nail right on the head. This is my first time putting a database on this host and I wasn't clear just how things fit together, but with your answer, things are up and running.

    I also like the dancing hamster on your avatar. :-)

  4. #4
    Anna's Avatar
    Anna is offline I am just me Anna is a name known to allAnna is a name known to all
    Join Date
    Aug 2007
    Location
    Sweden
    Posts
    6,569

    Re: Lost connection to MySQL server at 'reading initial communication packet'

    yeah, it is a nice avatar, thanks.

    glad to hear it works now, I'll close this thread then to mark as resolved.
    Do you have trouble reaching your site?
    Check here first: News and Announcements


    Don't forget that x10hosting has an irc server as well. Come and join the fun
    server: irc.x10hosting.com, main channel: #x10hosting
    There's a lot helpful users there if need help building your site

Closed Thread

Similar Threads

  1. Replies: 2
    Last Post: 03-11-2010, 11:45 PM
  2. Lost connection to MySQL server
    By upsalliance in forum Free Hosting
    Replies: 3
    Last Post: 01-25-2010, 07:03 AM
  3. Lost connection to MySQL server
    By zircontweez1 in forum Free Hosting
    Replies: 5
    Last Post: 02-14-2009, 07:40 PM
  4. communication packet
    By phil01455 in forum Free Hosting
    Replies: 0
    Last Post: 01-21-2008, 10:21 AM
  5. Replies: 9
    Last Post: 01-10-2008, 03:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers