CodeIgniter Forums
Connect to MySQl database on a server - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Connect to MySQl database on a server (/showthread.php?tid=38042)



Connect to MySQl database on a server - El Forum - 01-28-2011

[eluser]leet_2k[/eluser]
Hi there,
I am trying to connect to a database that is currently on my work's team dev server from home. Is that possible?
I have tried with following settings:-

$db['default']['hostname'] = "http://abcdev.com.au/";
$db['default']['username'] = "username";
$db['default']['password'] = "password";
$db['default']['database'] = "abc";
$db['default']['dbdriver'] = "mysql";

I get error that the Database connection error has occured.

Please help.
leet_2k


Connect to MySQl database on a server - El Forum - 01-28-2011

[eluser]apobukay[/eluser]
$db[‘default’][‘hostname’] = “abcdev.com.au”;
$db[‘default’][‘username’] = “username”;
$db[‘default’][‘password’] = “password”;
$db[‘default’][‘database’] = “abc”;
$db[‘default’][‘dbdriver’] = “mysql”;


Connect to MySQl database on a server - El Forum - 01-28-2011

[eluser]leet_2k[/eluser]
Nope.Still says Databse error. I am sure that all the username and passwords are correct..


Connect to MySQl database on a server - El Forum - 01-28-2011

[eluser]sean_THR[/eluser]
Try the IP address and ensure that there is no firewall on the server blocking you.


Connect to MySQl database on a server - El Forum - 01-28-2011

[eluser]leet_2k[/eluser]
No luck still.As far as I know I can't find any firewall option on the server..
Just want to point out that it is a virtual host


Connect to MySQl database on a server - El Forum - 01-28-2011

[eluser]cideveloper[/eluser]
Are you sure the server allows connections from outside the network? Was the username set up to have access from outside the network? What port is the server running on? What is the ip of the server when you are sitting at the box?

There are many reasons for this type of thing.


Connect to MySQl database on a server - El Forum - 01-28-2011

[eluser]leet_2k[/eluser]
Not sure man..
Anyway, can you please help me with another problem:

http://ellislab.com/forums/viewthread/179523/