Raised This Month: $51 Target: $400
 12% 

MySQL issue, anyone seen /tmp/mysql.sock' (2) ??


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sinblaster
Grim Reaper
Join Date: Feb 2010
Location: Australia
Old 08-21-2011 , 09:10   MySQL issue, anyone seen /tmp/mysql.sock' (2) ??
Reply With Quote #1

I have an issue with some errors I cant work them out, anyone able to shed any light please?

L 08/21/2011 - 06:56:10: [admin-sql-prefetch.smx] Could not connect to database "default": [2002]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
L 08/21/2011 - 06:56:10: [admin-sql-prefetch.smx] Could not connect to database "default": [2002]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
L 08/21/2011 - 06:56:10: [admin-sql-prefetch.smx] Could not connect to database "default": [2002]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
L 08/21/2011 - 06:56:11: [admin-sql-threaded.smx] Failed to connect to database: [2002]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

Its a linux server running latest stable meta, sourcemod and latest dev sdkhooks2. It "HAD" eventscripts" now gone.

cheers
__________________
Happy Happy Joy Joy


Last edited by sinblaster; 08-21-2011 at 09:41.
sinblaster is offline
8088
Veteran Member
Join Date: Jan 2008
Old 08-21-2011 , 13:25   Re: MySQL issue, anyone seen /tmp/mysql.sock' (2) ??
Reply With Quote #2

Which distribution? Make sure MySQL (mysqld) is running and the socket exists.
__________________
steamID converter with OpenSearch browser plugin
8088 is offline
Excel Gamers
Member
Join Date: Jul 2011
Old 08-21-2011 , 23:35   Re: MySQL issue, anyone seen /tmp/mysql.sock' (2) ??
Reply With Quote #3

Could you explain more, what do you mean by which distribution. And yes MySQL is running, what do you mean by the socket exists?

Thanks you for your response
Excel Gamers is offline
8088
Veteran Member
Join Date: Jan 2008
Old 08-21-2011 , 23:54   Re: MySQL issue, anyone seen /tmp/mysql.sock' (2) ??
Reply With Quote #4

On which Linux distribution is mysqld running? As in Debian, Ubuntu, CentOS, Fedora, et cetera. And can you show the part of my.cnf (usually in /etc/mysql/) where it says
Code:
[mysqld]
socket = ...
__________________
steamID converter with OpenSearch browser plugin
8088 is offline
Zephyrus
Cool Pig B)
Join Date: Jun 2010
Location: Hungary
Old 08-22-2011 , 01:40   Re: MySQL issue, anyone seen /tmp/mysql.sock' (2) ??
Reply With Quote #5

http://forums.alliedmods.net/showthread.php?p=526903
Zephyrus is offline
sinblaster
Grim Reaper
Join Date: Feb 2010
Location: Australia
Old 08-22-2011 , 06:28   Re: MySQL issue, anyone seen /tmp/mysql.sock' (2) ??
Reply With Quote #6

Quote:
Originally Posted by 8088 View Post
On which Linux distribution is mysqld running? As in Debian, Ubuntu, CentOS, Fedora, et cetera. And can you show the part of my.cnf (usually in /etc/mysql/) where it says
Code:
[mysqld]
socket = ...

He'll need to ask his game server host.

@Zephyrus Thanks mate, I actually tried all suggestions mentioned on that post for excel and none worked.
__________________
Happy Happy Joy Joy

sinblaster is offline
tigerox
AlliedModders Donor
Join Date: Oct 2008
Location: Canada
Old 08-22-2011 , 06:29   Re: MySQL issue, anyone seen /tmp/mysql.sock' (2) ??
Reply With Quote #7

try this quick fix...

ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock
__________________
tigerox is offline
CapITanJAC
AlliedModders Donor
Join Date: Aug 2012
Location: U.S.A
Old 09-13-2014 , 01:48   Re: MySQL issue, anyone seen /tmp/mysql.sock' (2) ??
Reply With Quote #8

Quote:
Originally Posted by tigerox View Post
try this quick fix...

Ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock
thank you, you are a life saver!
__________________
CapITanJAC is offline
kamild1996
Senior Member
Join Date: May 2011
Old 04-03-2017 , 06:02   Re: MySQL issue, anyone seen /tmp/mysql.sock' (2) ??
Reply With Quote #9

Since this is the first thread that appears when searching for that error in context of SourceMod, I'm going to drop my quick solution here.

If both your MySQL and game servers are on one box and you're getting this message - make sure you're using the same exact hostname as defined in the my.cnf file, as the "bind_address" variable. If it's set to 127.0.0.1, using localhost won't work (and probably the other way around)!
kamild1996 is offline
OSWO
Senior Member
Join Date: Jul 2015
Location: United Kingdom, London
Old 04-03-2017 , 08:48   Re: MySQL issue, anyone seen /tmp/mysql.sock' (2) ??
Reply With Quote #10

apt-get install lib32z1
__________________
SourceTimer | WeaponSkins++ | BasePlugins++ https://github.com/OSCAR-WOS
OSWO 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 16:31.


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