Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Member
    Join Date
    Aug 2004
    Posts
    7

    Default Php scripts cannot connect to MySQL

    Hello,
    My cpanel installation is only a couple days old and I am trying to install phpbb and I've check the database name and everything and it all seems to be correct but phpbb cannot connect to the database.

    My my.cnf looks like:

    [client]
    port=3306
    socket=/tmp/mysql.sock

    [mysqld]
    port=3306
    socket=/tmp/mysql.sock

    Can anyone please help me.

  2. #2
    Member
    Join Date
    Aug 2004
    Posts
    7

    Default

    can anyone please help me?

  3. #3
    Member dave9000's Avatar
    Join Date
    Apr 2003
    Location
    arkansas
    Posts
    891
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    before anyone can help you your going to have to give us some more information

    what is the error in phpbb ?

    what database name you trying to use ?

    Can you connect to the mysqld with any other program ?

  4. #4
    Member
    Join Date
    Jun 2004
    Location
    Columbus, OH
    Posts
    113

    Default

    I belive by default phpbb check for the mysql.sock in /var/tmp/ Check to make sure that you have a synmlink in /var/tmp for mysql if not make one ln -s /tmp/mysql.sock /var/tmp/mysql.sock.

    Thanks
    -Seth

  5. #5
    Member
    Join Date
    Aug 2004
    Posts
    7

    Default

    The phpbb error is:

    phpBB : Critical Error

    Could not connect to the database

    The database I am trying to connect to is called teamex_boards

    No other scripts connect

    On my vortex portal script I get:

    Details: Unable to connect to database

    also there was a mysql.sock file in the /var/tmp
    Last edited by anzix; 08-08-2004 at 07:56 PM.

  6. #6
    Member
    Join Date
    Aug 2004
    Posts
    7

    Default

    Fixed thanks to those who replied

  7. #7
    Member
    Join Date
    Jun 2004
    Location
    Columbus, OH
    Posts
    113

    Default

    what was the issue? no database?

    Thanks
    -Seth

  8. #8
    Member dave9000's Avatar
    Join Date
    Apr 2003
    Location
    arkansas
    Posts
    891
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Yea it would be nice if they would post the fixes so someone in the future could search and find it

  9. #9
    Member
    Join Date
    Sep 2003
    Posts
    6

    Default

    The easiest thing to do is run these two commands

    ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
    ln -s /var/lib/mysql/mysql.sock /var/tmp/mysql.sock

    Thats is what i have to do every now and then
    I run that and im all set everything is up and running

    Best thing to do is restart MySQl first then run those

Similar Threads & Tags
Similar threads

  1. Help! Can't connect MySQL after upgraded PHP 4.4.4 to 4.4.7
    By taotoon in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 04-25-2008, 02:33 PM
  2. PHP Won't connect to mySQL
    By deanstev in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 12-04-2007, 08:46 PM
  3. HELP php can't connect to mysql anymore
    By jamesbond in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 03-07-2003, 10:30 PM
  4. Can't connect to MySQL from PHP
    By avara in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 05-28-2002, 04:46 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube