laravel-oci8 icon indicating copy to clipboard operation
laravel-oci8 copied to clipboard

laravel 7 cannot migrate, ORA-01017: invalid username/password; logon denied

Open omanbuluatie opened this issue 4 years ago • 4 comments

Summary of problem or feature request

i have installed fresh new laravel 7 and yajra /laravel-oci8, when i run migrate command i get this error ;

Code snippet of problem

D:\webserver7\htdocs\laravel\simdat21>php artisan migrate

Yajra\Pdo\Oci8\Exceptions\Oci8Exception

ORA-01017: invalid username/password; logon denied

at D:\webserver7\htdocs\laravel\simdat21\vendor\yajra\laravel-pdo-via-oci8\src\Pdo\Oci8.php:478 474| } 475| 476| if (! $this->dbh) { 477| $e = oci_error();

478| throw new Oci8Exception($e['message'], $e['code']); 479| } 480| } 481| 482| /**

1 D:\webserver7\htdocs\laravel\simdat21\vendor\yajra\laravel-pdo-via-oci8\src\Pdo\Oci8.php:96 Yajra\Pdo\Oci8::connect("(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)) (CONNECT_DATA =(SID = MYDB)))", "MYUSER", "MYPASS", ["AL32UTF8"], "AL32UTF8")

2 D:\webserver7\htdocs\laravel\simdat21\vendor\yajra\laravel-oci8\src\Oci8\Connectors\OracleConnector.php:211 Yajra\Pdo\Oci8::__construct("(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)) (CONNECT_DATA =(SID = MYDB)))", "MYUSER", "MYPASS", ["AL32UTF8"])

System details

  • Operating System Windows 10
  • PHP Version 7.2.12
  • Laravel Version v7.30.1
  • Laravel-OCI8 Version "yajra/laravel-oci8": "7"

omanbuluatie avatar Nov 11 '20 23:11 omanbuluatie

Try connecting on oracle using SQL developer first to see if it works.

yajra avatar Dec 06 '20 12:12 yajra

I have the same problem!

I am using the same data that I can connect to via SQL Developer.

mppolo avatar Feb 17 '21 14:02 mppolo

I solved!

In my case it was a distraction.

I am working with 2 databases in the project, a mysql and an oracle.

So in the parameters of the Oracle connection in database.php you were using the MySQL values ​​of .env as connection parameters.

mppolo avatar Feb 17 '21 16:02 mppolo

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Oct 16 '22 04:10 github-actions[bot]

This issue was closed because it has been inactive for 7 days since being marked as stale.

github-actions[bot] avatar Oct 24 '22 04:10 github-actions[bot]