Cadu12 Posted July 7, 2012 Posted July 7, 2012 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.
TAPL Posted July 7, 2012 Posted July 7, 2012 if you show the code, we may can help you. if you don't, we can't help you at all.
Cadu12 Posted July 7, 2012 Author Posted July 7, 2012 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.
TAPL Posted July 7, 2012 Posted July 7, 2012 I am not sure, but maybe it require ip address not domain name also your domain redirect to other domain xg-clan.com ~> xg-clan.pt that may be the problem.
Anderl Posted July 7, 2012 Posted July 7, 2012 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.
Cadu12 Posted July 7, 2012 Author Posted July 7, 2012 Im not using VPS, just using DeluxHost. I tired remote access, does not work.
Anderl Posted July 7, 2012 Posted July 7, 2012 I do not see anything related to remote access too. Maybe you can contact them for more details about that.
GTX Posted July 7, 2012 Posted July 7, 2012 I had the same problem on my VPS. I found out that libmysqlclient.so.15 was missing. If you're using gamehost, you should contact host's developers.
Anderl Posted July 7, 2012 Posted July 7, 2012 Are you sure? If it would be, you would get error when starting server.
GTX Posted July 7, 2012 Posted July 7, 2012 Are you sure? If it would be, you would get error when starting server. Nope, I did get it when I tried to connect db.
Anderl Posted July 7, 2012 Posted July 7, 2012 Anyway, I got same problem as Cadu12 one too and it was remote access So, Cadu12, try checking remote access and that lib that GTX said.
Cadu12 Posted July 8, 2012 Author Posted July 8, 2012 Do you mean that I have to put lib in my site or main host?
Anderl Posted July 8, 2012 Posted July 8, 2012 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.
Cadu12 Posted July 8, 2012 Author Posted July 8, 2012 Still doesnt work, I have already remote access
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now