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

Solved HELP!!!! not able to connect mysql database


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
flashing
Senior Member
Join Date: Jul 2019
Location: India
Old 10-11-2019 , 15:55   HELP!!!! not able to connect mysql database
Reply With Quote #1

hello i am not able to connect mysql database to the plugin gloves
i did everything as instructed to edited addons/sourcemod/configs/databases.cfg like this
"gloves"
{
"driver" "mysql"
"host" "localhost"
"database" "gloves"
"user" "root"
"pass" "rootpassword"
}
i also changed "sm_gloves_db_connection" cvar inside cfg/sourcemod/gloves.cfg file to "gloves"
i also created the database in mysql
plz help

Last edited by flashing; 10-12-2019 at 09:14.
flashing is offline
paulo_crash
AlliedModders Donor
Join Date: May 2016
Location: Brazil
Old 10-11-2019 , 16:18   Re: HELP!!!! not able to connect mysql database
Reply With Quote #2

Quote:
Originally Posted by flashing View Post
hello i am not able to connect mysql database to the plugin gloves
i did everything as instructed to edited addons/sourcemod/configs/databases.cfg like this
"gloves"
{
"driver" "mysql"
"host" "localhost"
"database" "gloves"
"user" "root"
"pass" "rootpassword"
}
i also changed "sm_gloves_db_connection" cvar inside cfg/sourcemod/gloves.cfg file to "gloves"
i also created the database in mysql
plz help
Put your host's IP, database information correctly?

Remember, to use the MySQL option you need to have a web hosting.
paulo_crash is offline
flashing
Senior Member
Join Date: Jul 2019
Location: India
Old 10-11-2019 , 22:59   Re: HELP!!!! not able to connect mysql database
Reply With Quote #3

The mysql server and the csgo server are on the same machine so i have written localhost
Can u explain in detail what i have done wrong cuz im a noob in all this stuff
these are the error logs


L 10/12/2019 - 03:22:06: SourceMod error session started
L 10/12/2019 - 03:22:06: Info (map "de_dust2") (file "errors_20191012.log")
L 10/12/2019 - 03:22:06: [gloves.smx] Database failure: [2002]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
L 10/12/2019 - 03:22:06: [weapons.smx] Database failure: [2002]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
L 10/12/2019 - 03:22:22: [SM] Exception reported: Invalid database Handle 0 (error: 4)
L 10/12/2019 - 03:22:22: [SM] Blaming: gloves.smx

Last edited by flashing; 10-11-2019 at 23:25.
flashing is offline
quasemago
Senior Member
Join Date: Dec 2018
Location: Brazil
Old 10-12-2019 , 02:40   Re: HELP!!!! not able to connect mysql database
Reply With Quote #4

Create symbol link to the mysql sock in the temp folder.

PHP Code:
sudo ln -/var/run/mysqld/mysqld.sock /tmp/mysql.sock 
Tell me if work.
__________________
I accept requests for plugins and configuration of servers.


If you liked my work, consider making a donation via PayPal.
quasemago is offline
flashing
Senior Member
Join Date: Jul 2019
Location: India
Old 10-12-2019 , 06:52   Re: HELP!!!! not able to connect mysql database
Reply With Quote #5

i used 127.0.0.1 instead of localhost and it worked
flashing 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 21:47.


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