How to connect database using one not in localhost |
[eluser]Miftah Zein[/eluser]
[quote author="Atharva" date="1294327917"] Code: $db['server']['hostname'] = "192.168.0.120"; Either in server or local in $active_group, oddly enough i still get error message Maybe i have to hack the core database file in codeigniter?
[eluser]Atharva[/eluser]
No , this is related with you db settings. I was bit confused about your testing environment. Change Code: $active_group = "local"; Code: $db['local']['hostname'] = "192.168.0.120";
[eluser]Miftah Zein[/eluser]
yes i can access phpmyadmin, maybe the problem lies in database driver?? when i change hostname to localhost, everithing is ok. but if i set it to 192.168.0.120 i got error again sorry for bothering you again :-)
[eluser]Atharva[/eluser]
so 192.168.0.120 is IP of your own machine? Can you access like http://192.168.0.120/phpmyadmin ? Also, you can try to create a new user on 192.168.0.120 server, and then use that username and password in database.php and see if that works?
[eluser]Victor Michnowicz[/eluser]
Sometimes you need to put the port in there as well. Assuming MySQL connects on port 3307: Code: $db['local']['hostname'] = "192.168.0.120:3307"; |
Welcome Guest, Not a member yet? Register Sign In |