Raised This Month: $84 Target: $400
 21% 

Can't connect to local MySQL server through socket '/tmp/mysql.sock'


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
benmassey
Member
Join Date: Dec 2018
Old 06-12-2019 , 15:45   Can't connect to local MySQL server through socket '/tmp/mysql.sock'
Reply With Quote #1

hey guys, I hope someone can help me here, so I've installed a new server in my new dedicated server
everything works just fine except sourceban I'm using version 1.6.3 with theme star,
I'm using centos 7.2
php7.2 (web)

Description:

when I try to set admin, the web gives me success message
but when I check in logs I see that error:

Sourceban error:

PHP Code:
L 06/12/2019 20:34:35: [sbpp_main.smxDatabase failure: [2002]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2). See Docs: https://sbpp.github.io/docs/ 
Error log:
PHP Code:
L 06/12/2019 20:34:54: [SMException reportedInvalid database Handle 0 (error4)
L 06/12/2019 20:34:54: [SMBlamingsbpp_sleuth.smx
L 06
/12/2019 20:34:54: [SMCall stack trace:
L 06/12/2019 20:34:54: [SM]   [0SQL_TQuery
L 06
/12/2019 20:34:54: [SM]   [1Line 170D:\MegaSync\Projects\Sourcemod\scripting\sbpp_sleuth.sp::OnClientPostAdminCheck
L 06
/12/2019 20:34:54: [sbpp_comms.smxConnecting to database failed: [2002]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) 

I tried to log in to MySQL throw terminal and I succeed to log in...


what I tried to do to fix that:

change soket (socket=/var/lib/mysql/mysql.sock)
open port for mysql (3306)
restart service
benmassey is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 06-13-2019 , 07:46   Re: Can't connect to local MySQL server through socket '/tmp/mysql.sock'
Reply With Quote #2

Try changing the host in your databases.cfg file to use the IP address instead.

You're most likely using the hostname (e.g. "localhost") in the cfg, in that case, change to the IP version of "127.0.0.1" instead.
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread]
DarkDeviL is offline
benmassey
Member
Join Date: Dec 2018
Old 06-13-2019 , 17:31   Re: Can't connect to local MySQL server through socket '/tmp/mysql.sock'
Reply With Quote #3

Quote:
Originally Posted by DarkDeviL View Post
Try changing the host in your databases.cfg file to use the IP address instead.

You're most likely using the hostname (e.g. "localhost") in the cfg, in that case, change to the IP version of "127.0.0.1" instead.

the MYSQL server is from another host..
benmassey is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 06-14-2019 , 09:46   Re: Can't connect to local MySQL server through socket '/tmp/mysql.sock'
Reply With Quote #4

Quote:
Originally Posted by benmassey View Post
the MYSQL server is from another host..
Quote:
Originally Posted by benmassey View Post
Database failure: [2002]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).
^

Then configure your game server / systems properly to run through that that non-local "another host" server, ...
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread]
DarkDeviL 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 04:28.


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