Closed Thread
Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: Connecting database

  1. #1
    zestpanlo92 is offline x10Hosting Member zestpanlo92 is an unknown quantity at this point
    Join Date
    Apr 2011
    Posts
    12

    Exclamation Connecting database

    Hi everyone. anyone there can help me? i cant connect my database in x10hosting.com.
    pls help me. the error message is "Lost connection to MySQL server at 'reading initial communication packet', system error: 111"

  2. #2
    MaestroFX1's Avatar
    MaestroFX1 is offline Community Advocate MaestroFX1 has a spectacular aura about
    Join Date
    Feb 2008
    Location
    Area 51
    Posts
    1,577

    Re: Connecting database

    Could you please post your domain name ?

  3. #3
    zestpanlo92 is offline x10Hosting Member zestpanlo92 is an unknown quantity at this point
    Join Date
    Apr 2011
    Posts
    12

    Re: Connecting database

    my domain is www.greenscarf.co.cc
    and i was connecting my database to my blog

    ---------- Post added at 09:29 AM ---------- Previous post was at 09:27 AM ----------

    Quote Originally Posted by MaestroFX1 View Post
    Could you please post your domain name ?
    my domain is www.greenscarf.co.cc
    and i want to connect my database to my blog

  4. #4
    MaestroFX1's Avatar
    MaestroFX1 is offline Community Advocate MaestroFX1 has a spectacular aura about
    Join Date
    Feb 2008
    Location
    Area 51
    Posts
    1,577

    Re: Connecting database

    It is working for me!

  5. #5
    zestpanlo92 is offline x10Hosting Member zestpanlo92 is an unknown quantity at this point
    Join Date
    Apr 2011
    Posts
    12

    Re: Connecting database

    Quote Originally Posted by MaestroFX1 View Post
    It is working for me!

    yes.. my domain is working... but if you click the TAB named BLOGS you will see the error

  6. #6
    MaestroFX1's Avatar
    MaestroFX1 is offline Community Advocate MaestroFX1 has a spectacular aura about
    Join Date
    Feb 2008
    Location
    Area 51
    Posts
    1,577

    Re: Connecting database

    What did you use "mysql server name" as ?
    It should be localhost.

  7. #7
    zestpanlo92 is offline x10Hosting Member zestpanlo92 is an unknown quantity at this point
    Join Date
    Apr 2011
    Posts
    12

    Re: Connecting database

    Quote Originally Posted by MaestroFX1 View Post
    What did you use "mysql server name" as ?
    It should be localhost.
    heres my code:

    <?php
    // Your host, 99% of the time it's localhost.
    $db_host = 'localhost';
    // Your username for MySQL.
    $db_user = 'aianzki_aianzki';
    // Your password for MySQL.
    $db_pass = 'mypassword';
    // And your given name for the database.
    $db_name = 'aianzki_greenscarf';

    // The database connection.
    $con = mysql_connect($db_host, $db_user, $db_pass);
    if(!$con) {
    die("Cannot connect. " . mysql_error());
    }
    // The database name selection.
    $dbselect = mysql_select_db($db_name);
    if(!$dbselect) {
    die("Cannot select database " . mysql_error());
    }
    ?>

  8. #8
    MaestroFX1's Avatar
    MaestroFX1 is offline Community Advocate MaestroFX1 has a spectacular aura about
    Join Date
    Feb 2008
    Location
    Area 51
    Posts
    1,577

    Re: Connecting database

    Have you granted all the required privileges to the mysql user?

  9. #9
    zestpanlo92 is offline x10Hosting Member zestpanlo92 is an unknown quantity at this point
    Join Date
    Apr 2011
    Posts
    12

    Re: Connecting database

    Quote Originally Posted by MaestroFX1 View Post
    Have you granted all the required privileges to the mysql user?
    yes i granted all there permission.. in MySql Database and also to the MySql Database Wizard

    ---------- Post added at 09:58 AM ---------- Previous post was at 09:52 AM ----------

    Quote Originally Posted by MaestroFX1 View Post
    Have you granted all the required privileges to the mysql user?
    Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 111 in /home/aianzki/public_html/connect.php on line 12
    Cannot connect. Lost connection to MySQL server at 'reading initial communication packet', system error: 111

  10. #10
    MaestroFX1's Avatar
    MaestroFX1 is offline Community Advocate MaestroFX1 has a spectacular aura about
    Join Date
    Feb 2008
    Location
    Area 51
    Posts
    1,577

    Re: Connecting database

    What sort of data are you trying to fetch ?
    Is it of type blob? How many tables are there ?

Closed Thread
Page 1 of 3 123 LastLast

Similar Threads

  1. Error in connecting with database
    By webmaster.malik17 in forum Free Hosting
    Replies: 3
    Last Post: 03-12-2011, 07:55 PM
  2. Connecting to database
    By graphico in forum Programming Help
    Replies: 2
    Last Post: 09-21-2010, 12:31 PM
  3. Connecting to the database
    By rubencit in forum Ayuda Web
    Replies: 2
    Last Post: 05-30-2010, 02:09 PM
  4. Connecting to a database...
    By sathanna in forum Programming Help
    Replies: 4
    Last Post: 03-01-2010, 03:40 AM
  5. connecting to database
    By Daiphron in forum Free Hosting
    Replies: 2
    Last Post: 01-15-2008, 11:41 PM

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