Raised This Month: $32 Target: $400
 8% 

MySQL Connection Problems (mysql.sock) missing


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mad Professor
Junior Member
Join Date: May 2010
Old 02-15-2013 , 06:35   MySQL Connection Problems (mysql.sock) missing
Reply With Quote #1

Good day all.

I do hope I am posting this in the right place.

I am looking for help and advice with regards to setting up SourceBans on my server.

I have my GameServer & Website on the same server, I am running Ubuntu 12.04.1 x64 server, and Easy Hosting Control Panel (EHCP).

I have setup the MySQL database, and the website side of SourceBans is working fine, but I am having problems with the GameServer side.

Here is my /addons/sourcemod/configs/databases.cfg
Quote:
"Databases"
{
"driver_default" "mysql"

// When specifying "host", you may use an IP address, a hostname, or a socket file path

"sourcebans"
{
"driver" "mysql"
"host" "localhost"
"database" "sourcebans"
"user" "xxxxxxxxxx"
"pass" "xxxxxxxxxx"
"port" "3306"
//"timeout" "0"
}
"default"
{
"driver" "mysql"
"host" "localhost"
"database" "sourcemod"
"user" "xxxxxxxxxx"
"pass" "xxxxxxxxxx"
//"timeout" "0"
//"port" "0"
}

"storage-local"
{
"driver" "sqlite"
"database" "sourcemod-local"
}
"clientprefs"
{
"driver" "sqlite"
"host" "localhost"
"database" "clientprefs-sqlite"
"user" "xxxxxxxxxx"
"pass" "xxxxxxxxxx"
//"timeout" "0"
//"port" "0"
}
}

Here is my /addons/sourcemod/logssourcebans.log
Quote:
L 02/15/2013 - 10:52:42: [sourcebans.smx] Database failure: [2002]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2). See FAQ: http://www.sourcebans.net/node/20
I see that SourceBans is trying to connect to MySQL via the Socket file "/tmp/mysql.sock".
I have looked in the "/tmp" folder and there is no "mysql.sock" file.

I am new to Linux and MySQL, so at this point I am now stuck.

Can someone please adivce me what I need to do.

Thanks for your time.

Best Regards.
Mad Professor is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 02-15-2013 , 07:00   Re: MySQL Connection Problems (mysql.sock) missing
Reply With Quote #2

Use the IP instead
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
stoneyschillhouse
Senior Member
Join Date: Nov 2012
Old 02-15-2013 , 07:04   Re: MySQL Connection Problems (mysql.sock) missing
Reply With Quote #3

Just create a symlink (as root)

Code:
/etc/init.d/mysql stop # to stop the mysql server

ln -s /var/lib/mysql/mysql.sock mysql.sock # creates the symlink

/etc/init.d/mysql start # starts the mysql server again
__________________
SRY FOR MY BAD ENGLISH
I'm german
stoneyschillhouse is offline
Mad Professor
Junior Member
Join Date: May 2010
Old 02-15-2013 , 08:38   Re: MySQL Connection Problems (mysql.sock) missing
Reply With Quote #4

YamiKaitou: Thank you.

I changed "host" "localhost" to "host" "127.0.0.1"

And I no longer have any connection errors in the logs.

I known it had to be something simple, lol.

Last edited by Mad Professor; 02-15-2013 at 08:38.
Mad Professor is offline
Reply


Thread Tools
Display Modes

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 02:35.


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