laravel-oci8
laravel-oci8 copied to clipboard
laravel 7 cannot migrate, ORA-01017: invalid username/password; logon denied
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"
Try connecting on oracle using SQL developer first to see if it works.
I have the same problem!
I am using the same data that I can connect to via SQL Developer.
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.
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 7 days since being marked as stale.