Jump to content

dbConnect getting error


Cadu12

Recommended Posts

Hello, I have problem with dbConnect in host(linux) that I am getting error: "Could not connect", is there fix? Every time im getting error more than 5 days, I can't fix it.

PS: dbConnect is working on my localhost.

Link to comment
 autoConnect = nil 
autoConnect = setTimer( 
function() 
    connection = dbConnect("mysql", "dbname=xgclan_mta;host=xg-clan.com", "*", "*") 
    if connection then 
        killTimer(autoConnect) 
    end 
end 
, 1000, 0) 

I am sure, user and pass are ok.

Link to comment

It has nothing to do with that, TAPL.

@@Cadu12, your MySQL server must authorize remote access. You can do it connecting to the VPS and going to the folder /etc/.

Open the ".my.cnf" file and search for "bind-address", change it to * or just to the IP you want to give access. Save it and restart MySQL server by doing:

/etc/init.d/mysql restart

or:

/etc/init.d/mysqld restart

or:

service mysql restart

or:

service mysqld restart

Then go to the PHPMyAdmin and change the account privilegies to allow other IPs to connect using that account.

If you don't use VPS, your webhost does not allow remote access. Normally, upgrading to other package would solve that.

Link to comment

The game host, you should install that lib in the machine.

Anyway, did you check with your host provider about remote access? In CPanel of the webhost should be an option named "MySQL Remote Access". Click that option and add the IP of the game host.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...