Lua Sql Connection Problems

[lua]function GM.ConnectMySQL ( )
local MySQLError;
SQLDB, MySQLError = mysql.connect(“ip”, “user”, “pass”, “db”, 3306);
if ( SQLDB == 0 ) then
Msg( "SQL CONNECTION ERROR: " … MySQLError … "
" );
else
Msg( "SQL CONNECTION SUCCESS
" );
end
end

GM.ConnectMySQL()[/lua]

MySQL Connection Error - Unable to Contact Remote Database - Please Contact Administration

[lua] mysql.connect(“ip”, “user”, “pass”, “db”, 3306); [/lua]

Unless there is a computer with the ip of “ip” and a mysql server running on 3306 with the username “user” and the password “pass”, that’s not going to work out too well.

He might just have taken the details out for security, otherwise no, that isn’t going to work out very well.

Well yeah. Like I’m gonna post my information.

Is the database remote, or local?

Does your database allow remote connections? Usually it’s off by default for most hosts and you have to ask them to open it.

Normally, the error message for it not allowing remote connection is something along the lines of “Connection was forcefully rejected”

Not for me lol, For me it shows as “Cannot connect to MySQL Server at “xxx.xx.xx.xx” using password “YES””

I use go daddy. And I have gotten cider to connect to it.