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

Solved Database file not works


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dangerlord63
Senior Member
Join Date: Aug 2011
Old 10-01-2017 , 06:31   Database file not works
Reply With Quote #1

Hi guys, i installed sourcebans plugin and i made data base file settings but server is not connecting the correct ip adress, i say connect to x it connects the machine first ip.
databases.cfg
PHP Code:
"Databases"
{
    
"driver_default"        "sqlite"
    
    
// When specifying "host", you may use an IP address, a hostname, or a socket file path
    
    
"default"
    
{
        
"driver"            "default"
        "host"                "localhost"
        "database"            "sourcemod"
        "user"                "root"
        "pass"                ""
        
//"timeout"            "0"
        //"port"            "0"
    
}
    
    
"storage-local"
    
{
        
"driver"            "sqlite"
        "database"            "sourcemod-local"
    
}

    
"clientprefs"
    
{
        
"driver"            "sqlite"
        "host"                "localhost"
        "database"            "clientprefs-sqlite"
        "user"                "root"
        "pass"                ""
        
//"timeout"            "0"
        //"port"            "0"
    
}
    
"sourcebans"
    
{
        
"driver"            "mysql"
        "host"                "185.122.xxx.xx"
        "database"            "cs_ban"
        "user"                "cs_ban"
        "pass"                "xxxxxxx"
        
//"timeout"            "0"
        //"port"            "3306"
    
}

PHP Code:
Errors:
sbpp_checker.smx (SourceBans++: Bans Checker): Failed to connect to SourceBans DB, [1045]: Access denied for user 'cs_ban'@'185.100.100.50' (using passwordYES
185.100.100.50 is the main ip of the machine.

Last edited by dangerlord63; 10-03-2017 at 20:01.
dangerlord63 is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 10-01-2017 , 07:01   Re: Database file not works
Reply With Quote #2

try to change "driver_default" "sqlite" to "driver_default" "mysql"
8guawong is offline
dangerlord63
Senior Member
Join Date: Aug 2011
Old 10-01-2017 , 07:43   Re: Database file not works
Reply With Quote #3

not working
dangerlord63 is offline
Kurtan
AlliedModders Donor
Join Date: Feb 2016
Location: Sweden
Old 10-01-2017 , 11:23   Re: Database file not works
Reply With Quote #4

Quote:
Originally Posted by dangerlord63 View Post
Access denied for user 'cs_ban'@'185.100.100.50'
Either you have provided the wrong password for the user, or your user does not have permission to access this database.
__________________
Kurtan is offline
dangerlord63
Senior Member
Join Date: Aug 2011
Old 10-01-2017 , 15:38   Re: Database file not works
Reply With Quote #5

it give this error beacuse of the mysql server isn't installed at 185.100.100.50 so it can't connect.
the mysql server is in 185.122.xxx.xx but server trys to connect 185.100.100.50 ip, it is a databases.cfg file error i guess.
dangerlord63 is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 10-01-2017 , 16:13   Re: Database file not works
Reply With Quote #6

Have you got "free website with database" ?
__________________
Do not Private Message @me
Bacardi is offline
dangerlord63
Senior Member
Join Date: Aug 2011
Old 10-01-2017 , 18:51   Re: Database file not works
Reply With Quote #7

no my mysql server in a dedicated server with a licenced cpanel, e3-1220v3 cpu.
and csgo servers in i7-7700k cpu, so nothing is free.
all os is centos 6.x or 7.x x64
i have this error for so long time maybe for 3-4 monts, but now it get hight priorty to me. i need to fix this issue as soon as possible.
what i tried;
-disabling iptables and hardware firewall
-changing / etc / hosts file
-changing databases file host adress, even i change the ip to 8.8.8.8 it still tries to connect machine main ip address.

Last edited by dangerlord63; 10-01-2017 at 18:52.
dangerlord63 is offline
Phaiz
AlliedModders Donor
Join Date: Feb 2014
Location: USA
Old 10-02-2017 , 06:01   Re: Database file not works
Reply With Quote #8

Since you have cpanel I'm assuming you're using phpmyadmin. Did you create a user there? Try doing that and naming it something other than root and then change the user in the cfg file to that user.
__________________
Phaiz is offline
Kurtan
AlliedModders Donor
Join Date: Feb 2016
Location: Sweden
Old 10-02-2017 , 12:19   Re: Database file not works
Reply With Quote #9

Does the user have permission to access that specific database?
__________________
Kurtan is offline
dangerlord63
Senior Member
Join Date: Aug 2011
Old 10-03-2017 , 20:01   Re: Database file not works
Reply With Quote #10

i found error, it isn't about with password or any permission, it is simple, the editor that i've used inserted an invalid and hidden character after "driver" "(invalid character)mysql" so because of that it wasn't working.
Thanks for your helps
dangerlord63 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:32.


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