Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: Connecting CI to TWO different DB on localhost
Post: RE: Connecting CI to TWO different DB on localhost

Ok this seems to work after I edited the core file and added a 'socket' field. Thank you so far for this solution I can work with this until a fix is included into official release.
17,629 Views
0 Replies
12-16-2014, 07:59 AM
mindph
    Thread: Connecting CI to TWO different DB on localhost
Post: RE: Connecting CI to TWO different DB on localhost

Ok, this gives me a warning level PHP Code: -- Severity: Warning Message: mysql_select_db() expects parameter 2 to be resource, boolean given Filename: mysql/mysql_driver.php Line Number: 180 -...
17,629 Views
0 Replies
12-16-2014, 01:07 AM
mindph
    Thread: Connecting CI to TWO different DB on localhost
Post: RE: Connecting CI to TWO different DB on localhost

Rufnex Wrote: (12-15-2014, 11:33 AM) -- Is it exactly the same database? -- No Its the same database layout but it are two slave-instances for two different masters filling in different data. So b...
17,629 Views
0 Replies
12-15-2014, 11:40 AM
mindph
    Thread: Connecting CI to TWO different DB on localhost
Post: RE: Connecting CI to TWO different DB on localhost

Sadly this does not work. It gives an error: Message: mysqli::real_connect(): (HY000/2005): Unknown MySQL server host 'localhost:/var/run/mysqld/mysqld.sock' (2) Funny enough even if I uncomment th...
17,629 Views
0 Replies
12-15-2014, 11:19 AM
mindph
    Thread: Connecting CI to TWO different DB on localhost
Post: RE: Connecting CI to TWO different DB on localhost

Rufnex Wrote: (12-14-2014, 10:16 AM) -- You can use a socket in your connection like this PHP Code: -- 'hostname' => 'localhost:/var/run/mysqld/mysqld2.sock', -- -- Wow cool when this wor...
17,629 Views
0 Replies
12-14-2014, 06:12 PM
mindph
    Thread: Connecting CI to TWO different DB on localhost
Post: RE: Connecting CI to TWO different DB on localhost

Rufnex Wrote: (12-11-2014, 03:00 PM) -- Just connect to both depend on your database configuration like that PHP Code: -- $db1 = $this->load->database('db1', TRUE); $db2 = $this->load->datab...
17,629 Views
0 Replies
12-14-2014, 09:32 AM
mindph
    Thread: Connecting CI to TWO different DB on localhost
Post: Connecting CI to TWO different DB on localhost

Hello I am new I already wrote that question here but got no satisfying answer http://stackoverflow.com/questions/26741619/codeigniter-connecting-two-mysql-instances Let me describe the problem quic...
17,629 Views
0 Replies
12-09-2014, 11:06 AM
mindph

Theme © iAndrew 2016 - Forum software by © MyBB