Php scripts cannot connect to MySQL

anzix

Member
Aug 5, 2004
7
0
151
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.
 

dave9000

Well-Known Member
Apr 7, 2003
888
1
168
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 ?
 

sjackson909

Well-Known Member
Jun 8, 2004
113
0
166
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
 

anzix

Member
Aug 5, 2004
7
0
151
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:
Sep 1, 2003
6
0
151
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