AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Source Servers (SRCDS) (https://forums.alliedmods.net/forumdisplay.php?f=130)
-   -   Solved Database file not works (https://forums.alliedmods.net/showthread.php?t=301680)

dangerlord63 10-01-2017 06:31

Database file not works
 
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.

8guawong 10-01-2017 07:01

Re: Database file not works
 
try to change "driver_default" "sqlite" to "driver_default" "mysql"

dangerlord63 10-01-2017 07:43

Re: Database file not works
 
not working :(

Kurtan 10-01-2017 11:23

Re: Database file not works
 
Quote:

Originally Posted by dangerlord63 (Post 2551884)
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.

dangerlord63 10-01-2017 15:38

Re: Database file not works
 
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.

Bacardi 10-01-2017 16:13

Re: Database file not works
 
Have you got "free website with database" ?

dangerlord63 10-01-2017 18:51

Re: Database file not works
 
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.

Phaiz 10-02-2017 06:01

Re: Database file not works
 
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.

Kurtan 10-02-2017 12:19

Re: Database file not works
 
Does the user have permission to access that specific database?

dangerlord63 10-03-2017 20:01

Re: Database file not works
 
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


All times are GMT -4. The time now is 06:58.

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