Cadu12 Posted July 7, 2012 Share 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. Link to comment
TAPL Posted July 7, 2012 Share 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. Link to comment
Cadu12 Posted July 7, 2012 Author Share 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. Link to comment
TAPL Posted July 7, 2012 Share 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. Link to comment
Anderl Posted July 7, 2012 Share 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. Link to comment
Cadu12 Posted July 7, 2012 Author Share Posted July 7, 2012 Im not using VPS, just using DeluxHost. I tired remote access, does not work. Link to comment
Anderl Posted July 7, 2012 Share Posted July 7, 2012 I do not see anything related to remote access too. Maybe you can contact them for more details about that. Link to comment
GTX Posted July 7, 2012 Share 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. Link to comment
Anderl Posted July 7, 2012 Share Posted July 7, 2012 Are you sure? If it would be, you would get error when starting server. Link to comment
GTX Posted July 7, 2012 Share 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. Link to comment
Anderl Posted July 7, 2012 Share 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. Link to comment
Cadu12 Posted July 8, 2012 Author Share Posted July 8, 2012 Do you mean that I have to put lib in my site or main host? Link to comment
Anderl Posted July 8, 2012 Share 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. Link to comment
Cadu12 Posted July 8, 2012 Author Share Posted July 8, 2012 Still doesnt work, I have already remote access Link to comment
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