Page 1 of 2

Problems with mysql connection

Posted: 09 May 2013, 11:29
by ramioca
hi guys,

I have a big problem with mysql connection... i already tryed to reinstall and to check if i'm using the lasted version of amxbans, amxmodx and metamod and some more things but the error continue :c


From amxmodx log:

Code: Select all

L 05/09/2013 - 09:44:54: [amxbans_main.amxx] [AMXBans] Query failed!
L 05/09/2013 - 09:44:54: [amxbans_main.amxx] [AMXBans] Threaded Query Error, Place: 1
L 05/09/2013 - 09:44:54: [amxbans_main.amxx] [AMXBans] Message: Table 'amxbans._serverinfo' doesn't exist (1146)
L 05/09/2013 - 09:44:54: [amxbans_main.amxx] [AMXBans] Query statement: SELECT `motd_delay` FROM `_serverinfo` WHERE address = '188.93.237.7:28000'
L 05/09/2013 - 09:44:55: [amxbans_main.amxx] [AMXBans] Query failed!
L 05/09/2013 - 09:44:55: [amxbans_main.amxx] [AMXBans] Threaded Query Error, Place: 5
L 05/09/2013 - 09:44:55: [amxbans_main.amxx] [AMXBans] Message: Table 'amxbans._reasons' doesn't exist (1146)
L 05/09/2013 - 09:44:55: [amxbans_main.amxx] [AMXBans] Query statement:
L 05/09/2013 - 09:44:55: [amxbans_main.amxx] [AMXBans] No Reasons found in Database. Static reasons were loaded instead.


from screen log:

Code: Select all

Executing AMX Mod X Configuration File
[AMXBans] SQL error: can't connect: 'Access denied for user 'root'@'localhost' (using password: NO)'
[AMXBans] Loaded 1 admin from file
[AMXBans] is starting to execute amxbans.cfg
[AMXBans] amxbans.cfg is fully executed
L 05/09/2013 - 09:58:27: [amxbans_main.amxx] [AMXBans] Connection failed!
L 05/09/2013 - 09:58:27: [amxbans_main.amxx] [AMXBans] Threaded Query Error, Place: 1
L 05/09/2013 - 09:58:27: [amxbans_main.amxx] [AMXBans] Message: Access denied for user 'root'@'localhost' (using password: NO) (1045)
L 05/09/2013 - 09:58:27: [amxbans_main.amxx] [AMXBans] Query statement: SELECT `motd_delay` FROM `_serverinfo` WHERE address = '188.93.237.7:28000'


my amxbans.cfg is default

my sql.cfg:

Code: Select all

amx_sql_host    "127.0.0.1"
amx_sql_db   "amxbans"
amx_sql_user   "myuser"
amx_sql_pass   "mypassword"
amx_sql_table    "amx_bans"
amx_sql_type    "mysql"


I'm using the lasted version of amxbans(6.0.4package) and i also try a completely new install with a new database.

MySQL 5.1.69
Apache 2.2
PHP 5.3.3

Re: Problems with mysql connection

Posted: 09 May 2013, 14:23
by EmilsM
It cant connect with the password you provided with sql.cfg

Try puting amx_sql_user as "root" and password as blank (w/o quotes)

Or maybe theirs a different password for it, go to phpMyAdmin if you have one, and try to change it.

Re: Problems with mysql connection

Posted: 09 May 2013, 20:23
by ramioca
The sql.cfg and amxbans.cfg aren't exec by the plugin! I don't no why.... All things that you said I already know and tested too....

Re: Problems with mysql connection

Posted: 09 May 2013, 21:58
by YamiKaitou
sql.cfg is executed twice and amxbans.cfg is executed one (you even show that it is executed). If you claim that it isn't being executed, add an echo line to the cfg file and watch the console and see if they print.

Re: Problems with mysql connection

Posted: 01 Nov 2013, 18:57
by TI INDIAN
Well i get a error like this ..
SQL error: can't connect: 'Access denied for user 'root'@'77.***.***.** what to do ?

Code: Select all

Didnt provided the root name and the ip address.. dont think i wrote it like this in sql.cfg -_-


Ok time for logs .. sorry yamikatou.. but i face this problem.. with mysql...

Code: Select all

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'dg_site304'@'77.111.210.23' (using password: YES) in /data/filer-6/web/web304/htdocs/amxbans/include/config.inc.php on line 66

Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /data/filer-6/web/web304/htdocs/amxbans/include/config.inc.php on line 69

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /data/filer-6/web/web304/htdocs/amxbans/include/config.inc.php on line 69

Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /data/filer-6/web/web304/htdocs/amxbans/include/config.inc.php on line 70

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /data/filer-6/web/web304/htdocs/amxbans/include/config.inc.php on line 70

Warning: mysql_select_db() [function.mysql-select-db]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /data/filer-6/web/web304/htdocs/amxbans/include/config.inc.php on line 73

Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in /data/filer-6/web/web304/htdocs/amxbans/include/config.inc.php on line 73

Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /data/filer-6/web/web304/htdocs/amxbans/include/sql.inc.php on line 27

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /data/filer-6/web/web304/htdocs/amxbans/include/sql.inc.php on line 27
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)


Sorry for this long.. and oONE MORE THING THESE ARE WEBSITE ERROS.. and I GOT THEM WHEN I CHANGED PASSWORD OF DATABASE AND THESE THINGS APPEARED ON THE WEBPAGE on a blank page..and provide the solution clear and cut please. i am a newbie to this.. THANKS IN ADVANCE 8-)

Re: Problems with mysql connection

Posted: 02 Nov 2013, 00:45
by YamiKaitou
Access denied for user 'dg_site304'@'77.111.210.23' (using password: YES)

You need to grant access for that user to connect on that IP in your MySQL server

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Use the IP instead of the hostname for the MySQL Server

Re: Problems with mysql connection

Posted: 02 Nov 2013, 08:25
by TI INDIAN
Hum... Well I found out on google that we have o bind an ip address to grant access to the datbase of mysql server and that reuqires certainly high privileges.. and i am renting a web hositng.. so i have to probably ask them web hosting to do it for me...

Ok i got some information from mysql.. here are some information.. I want a confirmation that this is the ip address or not..

Server: sql-1.******** .net (sql-1.*******.net via TCP/IP)
Software: MySQL
Software version: 5.1.49-3 - (Debian)
Protocol version: 10
User: dg_site304@10.0.1.192
Server charset: UTF-8 Unicode (utf8)

dg_site304 is my user... and this information is acquired from mysql and its information of my database.. :mrgreen:

Is this mysql server's ip address 10.0.1.192 :|

Re: Problems with mysql connection

Posted: 02 Nov 2013, 18:05
by YamiKaitou
TI INDIAN wrote:Hum... Well I found out on google that we have o bind an ip address to grant access to the datbase of mysql server and that reuqires certainly high privileges.. and i am renting a web hositng.. so i have to probably ask them web hosting to do it for me...

I have no idea what you are talking about

Is this mysql server's ip address 10.0.1.192 :|

No, it is whatever the IP address is for the DNS entry sql-1.******** .net

Re: Problems with mysql connection

Posted: 02 Nov 2013, 19:09
by TI INDIAN
Well.. i have nothing but just now waiting for the reply from the web hosting.. got nothing else then waiting :geek: :ugeek: ... is better tell them to do it for us. certainly it makes 2 or 3 days they get the job done.. hoapefully i should get a positive reply :|

Re: Problems with mysql connection

Posted: 02 Nov 2013, 20:10
by YamiKaitou
If your web host uses cPanel, you can grant access yourself using the Remote MySQL section