AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   SourceBans / SourceBans++ (https://forums.alliedmods.net/forumdisplay.php?f=152)
-   -   MySQL Connection Problems (mysql.sock) missing (https://forums.alliedmods.net/showthread.php?t=208577)

Mad Professor 02-15-2013 06:35

MySQL Connection Problems (mysql.sock) missing
 
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.

YamiKaitou 02-15-2013 07:00

Re: MySQL Connection Problems (mysql.sock) missing
 
Use the IP instead

stoneyschillhouse 02-15-2013 07:04

Re: MySQL Connection Problems (mysql.sock) missing
 
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


Mad Professor 02-15-2013 08:38

Re: MySQL Connection Problems (mysql.sock) missing
 
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.


All times are GMT -4. The time now is 18:42.

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