mirror of
https://github.com/DBDiff/DBDiff.git
synced 2026-04-25 05:15:49 +03:00
[GH-ISSUE #124] Cannot connect to target database #228
Labels
No labels
bug
enhancement
good first issue
help wanted
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/DBDiff#228
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @SanaAnsari09 on GitHub (Jul 12, 2021).
Original GitHub issue: https://github.com/DBDiff/DBDiff/issues/124
I have been trying many possible things to resolve this. I wanted to know whether comparison of schema and data can happen between different versions of mysql.
@ratedcrypto commented on GitHub (Jul 15, 2021):
To debug the issue comment out try-catch in src/DB/DBManager.php/testResource line 37.
public function testResource($input, $res) { // try { $this->capsule->getConnection($res); // } catch(\Exception $e) { // throw new DBException("Can't connect to target database"); // } if (!empty($input['table'])) { try { $this->capsule->getConnection($res)->table($input['table'])->first(); } catch(\Exception $e) { throw new DBException("Can't access target table"); } } }Might need to install a driver I used docker so used the following command to install:
docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mysql