Edit path in phpbb2 to find the file "mysql.sock"?

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
cw6er
Registered User
Posts: 1
Joined: Wed Nov 05, 2008 6:13 am

Edit path in phpbb2 to find the file "mysql.sock"?

Post by cw6er » Mon Nov 10, 2008 8:13 pm

Where do you change the path in phpbb2 to find the file "mysql.sock"?

I get the following error when trying to connect to phpbb2
:Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) in /Library/WebServer/Documents/phpBB2/db/mysql4.php on line 48
Now, the default location on the Mac is "private/tmp/mysql.sock", so I moved "mysql.sock" to the location phpBB2 as looking for: "private/var/mysql/mysql.sock" and both phpBB2 and phpMyAdmin started working fine.

But, now the Mac Bash Terminal would not connect to the server with the command "mysql" like it did before (who knows what else broke), so I moved it back. I edited phpMyAdmin to find the socket in the default location: "private/tmp/mysql.sock", and it is up and working, now i need to do the same in phpBB2.

In my search for info to do this, I found a reference to setting a symbolic link from the "private/tmp" to "private/var/mysql" so I tried this in the Terminal:

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

which gave me the link, but it apperntly is not working through the link, phpBB2 still gives me the same error.

So, I am back to editing the path in phpBB2 to find the socket in the default location.

Thanks in advance for your time
Chris



Your board's URL: None-it's local
Version of phpBB2: 2.0.63
Was this a fresh install or a(n) update/upgrade/conversion (please be specific)? Fresh Install
Did you use an automated wizard provided by your host to install phpBB? No
MODs you have installed: None
When the problem started: On Installation
Your level of expertise (be honest): low (Just enough to be dangerous) :mrgreen:

Additionally, you may wish to provide the following (where applicable)
Template(s) used: None
Language(s) used:
Version of PHP used: 4.4.9
Database and version used MySQL 5.0
OS: Mac OSX 4.9 Bundled Apache and PHP up and running

User avatar
ric323
Former Team Member
Posts: 22909
Joined: Tue Feb 06, 2007 12:33 am
Location: Melbourne, Australia
Name: Ric
Contact:

Re: Edit path in phpbb2 to find the file "mysql.sock"?

Post by ric323 » Mon Nov 10, 2008 9:20 pm

cw6er wrote:Version of phpBB2: 2.0.63
Do you mean 2.0.23 ? There is no 2.0.63 version.

I'm no SQL expert, but this sounds more like a PHP/MySQL setup issue than anything to do with phpBB itself.
Last edited by ric323 on Tue Nov 11, 2008 6:16 am, edited 1 time in total.
Reason: fixed quote tag position
The Knowledge Base contains solutions to many common problems!
How to fix "Doesn't have a default value" and "Incorrect string value: xxx for column 'post_text' " errors.
How to do a clean re-install of the latest phpBB3 version.
Problems with permissions? Read phpBB3 Permissions

User avatar
espicom
Registered User
Posts: 17905
Joined: Wed Dec 22, 2004 1:14 am
Location: Woodstock, IL

Re: Edit path in phpbb2 to find the file "mysql.sock"?

Post by espicom » Tue Nov 11, 2008 5:33 am

The path to the socket file is set in php.ini, not in anything you do in phpBB. If it isn't correct, it's because the server isn't properly configured yet.

Alternatively, you can specify the server address as "127.0.0.1" instead of "localhost", and the socket file is taken out of the equation; using "localhost" bypasses the use of TCP/IP to talk to the MySQL server.
Jeff
Fixing 1016/1030/1034 Errors | (obsolete link) | MySQL 4.1/5.x Client Error | phpBBv2 Logo in ACP
Support requests via PM are ignored!
"To be fully alive is to feel that everything is possible." - Eric Hoffer

kaweah
Registered User
Posts: 1
Joined: Thu Jan 01, 2009 12:58 am

Re: Edit path in phpbb2 to find the file "mysql.sock"?

Post by kaweah » Thu Jan 01, 2009 1:11 am

Espicom wrote:
Alternatively, you can specify the server address as "127.0.0.1" instead of "localhost", and the socket file is taken out of the equation
That did the trick for me. Thanks!

Locked

Return to “2.0.x Support Forum”

Who is online

Users browsing this forum: No registered users and 27 guests