The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Php scripts cannot connect to MySQL

Discussion in 'Database Discussions' started by anzix, Aug 7, 2004.

  1. anzix

    anzix Member

    Joined:
    Aug 5, 2004
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    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. anzix

    anzix Member

    Joined:
    Aug 5, 2004
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    can anyone please help me?
     
  3. dave9000

    dave9000 Well-Known Member

    Joined:
    Apr 7, 2003
    Messages:
    891
    Likes Received:
    1
    Trophy Points:
    16
    Location:
    arkansas
    cPanel Access Level:
    Root Administrator
    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. sjackson909

    sjackson909 Well-Known Member

    Joined:
    Jun 8, 2004
    Messages:
    113
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Columbus, OH
    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. anzix

    anzix Member

    Joined:
    Aug 5, 2004
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    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
     
    #5 anzix, Aug 8, 2004
    Last edited: Aug 8, 2004
  6. anzix

    anzix Member

    Joined:
    Aug 5, 2004
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Fixed thanks to those who replied :)
     
  7. sjackson909

    sjackson909 Well-Known Member

    Joined:
    Jun 8, 2004
    Messages:
    113
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Columbus, OH
    what was the issue? no database?

    Thanks
    -Seth
     
  8. dave9000

    dave9000 Well-Known Member

    Joined:
    Apr 7, 2003
    Messages:
    891
    Likes Received:
    1
    Trophy Points:
    16
    Location:
    arkansas
    cPanel Access Level:
    Root Administrator
    Yea it would be nice if they would post the fixes so someone in the future could search and find it
     
  9. volumehosting12

    Joined:
    Sep 1, 2003
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    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
     
Loading...

Share This Page