Problems with MySQL Server and phpBB2

Discussion in 'Server Operation' started by EagleMan76, Feb 1, 2009.

  1. EagleMan76

    EagleMan76 New Member

    Hi, I am currently trying to set up a phpBB2 based site on my Ubuntu Linux Server 8.10 machine. I have LAMP installed, and I try to install the phpBB2 software. My site domain is http://parkstaffzoneforums.com and I have a temporary link to the /phpBB2/install/install.php file at the bottom of the page.
    I am able to login to /phpmyadmin and get into MySQL settings, and I am able to get to the first page of the phpBB2 setup. However, after I submit the first page I get this:
    Code:
    Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 111 in /var/www/phpBB2/db/mysql4.php on line 48
    
    Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /var/www/phpBB2/db/mysql4.php on line 330
    
    Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /var/www/phpBB2/db/mysql4.php on line 331
    phpBB : Critical Error
    
    Could not connect to the database
    And here is the file the error codes are referring to:
    PHP:
    <?php
    /***************************************************************************
     *                                 mysql4.php
     *                            -------------------
     *   begin                : Saturday, Feb 13, 2001
     *   copyright            : (C) 2001 The phpBB Group
     *   email                : supportphpbb.com
     *
     *   $Id: mysql4.php 5211 2005-09-18 16:17:21Z acydburn $
     *
     ***************************************************************************/

    /***************************************************************************
     *
     *   This program is free software; you can redistribute it and/or modify
     *   it under the terms of the GNU General Public License as published by
     *   the Free Software Foundation; either version 2 of the License, or
     *   (at your option) any later version.
     *
                                   [ Read 340 lines ]
    ^G Get Help  ^O WriteOut  ^R Read File ^Y Prev Page ^K Cut Text  ^C Cur Pos
    ^X Exit      ^J Justify   ^W Where Is  ^V Next Page ^U UnCut Text^T To Spell
      GNU nano 2.0.7       File: /var/www/phpBB2/db/mysql4.php                      

    <?php
    /***************************************************************************
     *                                 mysql4.php
     *                            -------------------
     *   begin                : Saturday, Feb 13, 2001
     *   copyright            : (C) 2001 The phpBB Group
     *   email                : supportphpbb.com
     *
     *   $Id: mysql4.php 5211 2005-09-18 16:17:21Z acydburn $
     *
     ***************************************************************************/

    /***************************************************************************
     *
     *   This program is free software; you can redistribute it and/or modify
     *   it under the terms of the GNU General Public License as published by
     *   the Free Software Foundation; either version 2 of the License, or
     *   (at your option) any later version.
     *
                                   [ Read 340 lines ]
    ^G Get Help  ^O WriteOut  ^R Read File ^Y Prev Page ^K Cut Text  ^C Cur Pos
    ^X Exit      ^J Justify   ^W Where Is  ^V Next Page ^U UnCut Text^T To Spell
      GNU nano 2.0.7                                        File: /var/www/phpBB2/db/mysql4.php                                                                                       

            function sql_nextid()
            {
                    return ( $this->db_connect_id ) ? mysql_insert_id($this->db_connect_id) : false;
            }

            function sql_freeresult($query_id = 0)
            {
                    if( !$query_id )
                    {
                            $query_id = $this->query_result;
                    }

                    if ( $query_id )
                    {
                            unset($this->row[$query_id]);
                            unset($this->rowset[$query_id]);

                            mysql_free_result($query_id);

                            return true;
                    }
                    else
                    {
                            return false;
                    }
            }

            function sql_error()
            {
                    $result['message'] = mysql_error($this->db_connect_id);
                    $result['code'] = mysql_errno($this->db_connect_id);

                    return $result;
            }

    } // class sql_db

    } // if ... define

    ?>

    I have also made it available for open login so if I didn't provide enough information of if you want to re-create the error feel free to, I have nothing of importance on the machine other than Linux and apps.
    I'm sure there is some simple command or change I can make, but I am quite new working with Unix systems (only had it now for 2 days) so any help would be greatly appreciated!!!
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Do you really have this in the file?

    [ Read 340 lines ]
    ^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos
    ^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Text^T To Spell
    GNU nano 2.0.7 File: /var/www/phpBB2/db/mysql4.php
     
  3. DigitalLinx

    DigitalLinx New Member

    Appears to be copy/paste from nano, nonetheless it's commented so it shouldn't matter.
    Make sure that mysql is up and running, login with the mysql username supplied in phpbb's configuration file via console/ssh
    Code:
    mysql -uuser -p
    
    Post any errors you get. I have a feeling that mysqld is either broken or it's just not running.
     
  4. EagleMan76

    EagleMan76 New Member

    whoops, i accidentally copied/pasted the stuff from nano when i had it open, so thats not part of the file
     
  5. falko

    falko Super Moderator Howtoforge Staff

    What are the outputs of
    Code:
    netstat -tap
    and
    Code:
    ps aux
    ?
     

Share This Page