Laravel没有与Oracle建立联系 [英] Laravel dosen't connect with Oracle
本文介绍了Laravel没有与Oracle建立联系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 yajra/laravel-oci8 Oracle与laravel的连接.但是我无法从客户端PC到服务器连接到Oracle.
I'm using yajra/laravel-oci8 for Oracle connection with laravel. But I couldn't connected to Oracle, from my client PC to Server.
显示此错误:
我在database.php中使用此代码:
I'm using this code in database.php:
'oracle' => array(
'driver' => 'oracle',
'host' => '192.168.152.189',// this is my server IP
'port' => '1521',
'database' => 'ocp',
'username' => 'ocpl',
'password' => '123456',
'charset' => 'AL32UTF8',
'prefix' => '',
'port' => 1521
),
但是我已经与Sql Developer连接了. 请参见Sql-Developer属性:
But I'm connected with Sql Developer. see the Sql-Developer Property:
推荐答案
尽管此问题已在将近三年后发布... 但我只是用这种方式来解决这个问题
Although this question has been posted after almost three year... but I just use this way to solve this problem
在oracle中搜索此命令
search this command in oracle
Select instance_name from v$instance;
然后将值粘贴到数据库"设置中
then paste the value into 'database' setting
这篇关于Laravel没有与Oracle建立联系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文