This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Set custom MySQL socket location


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TronPaul
New Member
Join Date: Jan 2010
Old 06-10-2012 , 21:09   Set custom MySQL socket location
Reply With Quote #1

I've seen all the replies to the various
Quote:
Could not connect to database "default": [2002]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
but I can't seem to find information on how to set the socket location. Linking the actual socket to the preset socket location seems like a poor solution. Is there a way to set the socket location for the database?

Code:
{
                "driver"                        "mysql"
                "socket"                        "/run/mysqld/mysqld.sock"
                "database"                      "phpbb"
                "user"                          "root"
                "pass"                          "*****"
}
Thanks
TronPaul is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 06-11-2012 , 03:02   Re: Set custom MySQL socket location
Reply With Quote #2

That should work fine.

As the comment at the top of databases.cfg says:
Code:
// When specifying "host", you may use an IP address, a hostname, or a socket file path
__________________
asherkin is offline
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 06-11-2012 , 05:17   Re: Set custom MySQL socket location
Reply With Quote #3

So long as he replaces "socket" with "host" he should be fine.

Note however, TronPaul, that it's best not to use the root user to connect to the database. Create a user for phpbb with only the privileges it needs.
__________________
11530 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:11.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode