Gotik2 Posted September 28, 2009 Posted September 28, 2009 Hi, Im trying to connect with my mysql server on my pc wowla.servegame.com with port 3306 When I connect from other pc with sqlyog I can, but when I try to connect from the host I can not :S Im using this $dbhost = 'wowla.servegame.com:3306'; $dbuser = 'myuser'; $dbpass = 'mypass'; mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'); I tried too $dbhost = 'wowla.servegame.com'; $dbuser = 'myuser'; $dbpass = 'mypass'; mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'); But nothing, always it say Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'wowla.servegame.com' (4) in /home/wowla/public_html/index.php on line 6 Error connecting to mysql I think Im doing something wrong Anyone can help me please? I dont know what to do :S
Ashoat Posted September 29, 2009 Posted September 29, 2009 Did you add your IP address to your MySQL access list in cPanel?
Gotik2 Posted September 29, 2009 Author Posted September 29, 2009 Where? :S I added my ip to MySQL REMOTE but nothing Thanks
Ashoat Posted September 30, 2009 Posted September 30, 2009 Try "stevie.heliohost.org:3306" for the hostname.
Gotik2 Posted September 30, 2009 Author Posted September 30, 2009 If I put stevie.heliohost.org:3306 it connected But I need to acces to a external mysql :S Thanks
Ashoat Posted September 30, 2009 Posted September 30, 2009 Are you are trying to connect to HelioHost from another server, or another server from HelioHost?
Gotik2 Posted October 1, 2009 Author Posted October 1, 2009 I try to connect my page on heliohost to my mysql server
Ashoat Posted October 1, 2009 Posted October 1, 2009 Then you need to consult the person hosting your MySQL server to add HelioHost to their access list.
Gotik2 Posted October 3, 2009 Author Posted October 3, 2009 I have the mysql with remote acceses enable because I cna enter with the same code (php) in other hosts but here it say Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'wowla.servegame.com' (4) in /home/wowla/public_html/test.php on line 6 Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/wowla/public_html/test.php on line 7 The host block this connecition?
Ashoat Posted October 4, 2009 Posted October 4, 2009 Yes, the MySQL host is blocking your connection. You need to talk to them and have them remove their firewall or add an exception.
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