Laravel dosen't connect with Oracle

我们两清 提交于 2019-12-04 11:49:19

problem in this line : 'database' => 'ocp' , solve it with : 'database' => 'orcl' , or

'database' => '192.168.152.189/orcl'

RANJITH

Try this

'oracle' => array(
       'driver' => 'oracle',
       'tns' => '(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.152.189)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = orcl)))',
       //'host' => '192.168.152.189',// this is my server IP
       //'port' => '1521',
       'database' => '',
       'username' => 'ocpl',
       'password' => '123456',
       'charset' => 'AL32UTF8',
       'prefix' => '',
),

Although this question has been posted after almost three year... but I just use this way to solve this problem

search this command in oracle

Select instance_name from v$instance;

then paste the value into 'database' setting

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!