Welcome Guest, Not a member yet? Register   Sign In
How to connect database using one not in localhost
#11

[eluser]Miftah Zein[/eluser]
[quote author="Atharva" date="1294327917"]
Code:
$db['server']['hostname'] = "192.168.0.120";

$active_group = "server";
[/quote]

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?
#12

[eluser]Atharva[/eluser]
No , this is related with you db settings. I was bit confused about your testing environment. Change
Code:
$active_group = "local";
and
Code:
$db['local']['hostname'] = "192.168.0.120";
Can you access phpmyadmin of 192.168.0.120 from your machine?
#13

[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 :-)
#14

[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?
#15

[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";




Theme © iAndrew 2016 - Forum software by © MyBB