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

Could not connect: Driver "MySQL" not found


Post New Thread Reply   
 
Thread Tools Display Modes
TheRedBull
Member
Join Date: May 2015
Old 06-18-2015 , 07:19   Re: Could not connect: Driver "MySQL" not found
Reply With Quote #11

Hey i had the same error:
[multi1v1.smx] Could not connect: [2002]: Can't connect
to local MySQL server through socket '/tmp/mysql.sock' (2)

I fixed this by changing "localhost" to "127.0.0.1" in databases.cfg

I hope this works for you guys as well let me know

Last edited by TheRedBull; 06-18-2015 at 07:20.
TheRedBull is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 06-18-2015 , 19:56   Re: Could not connect: Driver "MySQL" not found
Reply With Quote #12

When I first got my dedi from OVH.com and then later switched from one dedicated server from OVH to two, I encountered similar issues.

The solution partly was installing necessary 32-bit libs as I used Ubuntu 12.04 64-bit. However, the issue kept persisting.

I do believe that if you haven't done so already, you should try restarting your dedicated server (provided you have a dedicated server) as that may help refresh things and help the dedicated server initialize MySQL properly.

As well, make sure MySQL has been started;

Code:
service mysqld start
Finally, make sure you have 32-bit libs if you're running a 64-bit OS;

Code:
$ sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0
The issue I encountered was SourceBans not starting because MySQL was not running and the appropriate sql sourcemod extension was unable to load. I really wish I had written down what I did to fix the issue as that may have helped you.

Last edited by 404UserNotFound; 06-18-2015 at 19:57.
404UserNotFound is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 06-18-2015 , 20:02   Re: Could not connect: Driver "MySQL" not found
Reply With Quote #13

Quote:
Originally Posted by spot View Post
After reinstalling mysql, i get the same message.
[multi1v1.smx] Could not connect: [2002]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Use '/var/run/mysqld/mysqld.sock' as the hostname rather than 'localhost'.
__________________
asherkin is offline
aeleos
Member
Join Date: Sep 2014
Old 06-19-2015 , 01:57   Re: Could not connect: Driver "MySQL" not found
Reply With Quote #14

Basically, I am pretty sure the problem is that you have sourcemod looking for the mysql socket in /tmp/mysql.sock and you have your mysql on your vps putting the socket in /var/run/mysqld/mysqld.sock. I am pretty sure the way to solve this is too make a symlink between so when sourcemod looks for the socket in /tmp/ it gets redirected to where mysql installed it in /var/. I think this command will fix the problem.
Code:
ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock
__________________

Last edited by aeleos; 06-19-2015 at 01:57.
aeleos is offline
spot
Senior Member
Join Date: May 2009
Old 06-24-2015 , 03:22   Re: Could not connect: Driver "MySQL" not found
Reply With Quote #15

Quote:
Originally Posted by aeleos View Post
Basically, I am pretty sure the problem is that you have sourcemod looking for the mysql socket in /tmp/mysql.sock and you have your mysql on your vps putting the socket in /var/run/mysqld/mysqld.sock. I am pretty sure the way to solve this is too make a symlink between so when sourcemod looks for the socket in /tmp/ it gets redirected to where mysql installed it in /var/. I think this command will fix the problem.
Code:
ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock
After i tryed your command i still get this error:
06/24/2015 - 09:20:06: [multi1v1.smx] Could not connect: [2002]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
I even check that the /var/run/mysqld/mysqld.sock is there, and it is.

and btw:
lib32gcc1 is already the newest version.

Last edited by spot; 06-24-2015 at 03:28.
spot is offline
spot
Senior Member
Join Date: May 2009
Old 06-24-2015 , 16:46   Re: Could not connect: Driver "MySQL" not found
Reply With Quote #16

Quote:
Originally Posted by TheRedBull View Post
Hey i had the same error:
[multi1v1.smx] Could not connect: [2002]: Can't connect
to local MySQL server through socket '/tmp/mysql.sock' (2)

I fixed this by changing "localhost" to "127.0.0.1" in databases.cfg

I hope this works for you guys as well let me know
Tryed that, and i get this error then:
Could not connect: [2013]: Lost connection to MySQL server at 'reading initial communication packet', system error: 111
spot is offline
spot
Senior Member
Join Date: May 2009
Old 06-26-2015 , 06:24   Re: Could not connect: Driver "MySQL" not found
Reply With Quote #17

Anyone?
spot is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 06-27-2015 , 14:39   Re: Could not connect: Driver "MySQL" not found
Reply With Quote #18

Quote:
Originally Posted by spot View Post
Anyone?
If you don't remember the AlliedModders Rules, I suggest you re-read them:

Quote:
Do not "bump" your threads. Bumping is posting simply to make the thread higher in the forum sort order.
This has been discussed somewhere else, where the result was no matter how long time you had no answers in, bumping was still not allowed.

Quote:
Originally Posted by asherkin View Post
Use '/var/run/mysqld/mysqld.sock' as the hostname rather than 'localhost'.
What happened with asherkin's suggestion?

Also, what does this one give to you?

Code:
netstat -anp|grep -i mysql
__________________
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
haeufi
Junior Member
Join Date: May 2012
Old 06-28-2015 , 14:15   Re: Could not connect: Driver "MySQL" not found
Reply With Quote #19

Quote:
Originally Posted by jonitaikaponi View Post
Also, if you are running on Linux, try to install lib32z1.

apt-get install lib32z1
This did the trick for me on debian wheezy. NOTE: You have to restart the server in order to apply the change, mapchange doesn´t reload extensions.
haeufi is offline
spot
Senior Member
Join Date: May 2009
Old 07-01-2015 , 04:47   Re: Could not connect: Driver "MySQL" not found
Reply With Quote #20

Quote:
Originally Posted by arne1288 View Post
If you don't remember the AlliedModders Rules, I suggest you re-read them:

This has been discussed somewhere else, where the result was no matter how long time you had no answers in, bumping was still not allowed.
- Sorry


What happened with asherkin's suggestion?


Also, what does this one give to you?
Code:
netstat -anp|grep -i mysql
sudo netstat -anp|grep mysql
tcp 0 0 10.22.4.75306 0.0.0.0:* LISTEN 1090/mysqld
unix 2 [ ACC ] STREAM LISTENING 10961 1090/mysqld /var/run/mysqld/mysqld.sock

asherkin's suggestion:
Did not work, i can try again?

Quote:
Originally Posted by haeufi View Post
This did the trick for me on debian wheezy. NOTE: You have to restart the server in order to apply the change, mapchange doesn´t reload extensions.
sudo apt-get install lib32z1
lib32z1 is already the newest version.
0 to upgrade, 0 to newly install, 0 to remove and 4 not to upgrade.
spot 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 17:19.


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