Skip to content

Commit d25ee0c

Browse files
committed
added option for SSH
1 parent 0a78b5c commit d25ee0c

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
## Introduction
66
Sync remote database to a local database
77

8-
>Note this requires remote MySQL access in order to connect to a remote MySQL database. It does not use SSH currently. I'm open to PR's
8+
Connection can be made over SSH or using a remote MySQL connection.
99

1010
## Install
1111

@@ -27,12 +27,32 @@ php artisan vendor:publish --provider="Dcblogdev\DbSync\DbSyncServiceProvider" -
2727

2828
Set the remote database credentials in your .env file
2929

30+
When using SSH Add:
3031
```
32+
REMOTE_USE_SSH=true
33+
REMOTE_SSH_PORT=22
34+
REMOTE_SSH_USERNAME=
3135
REMOTE_DATABASE_HOST=
36+
3237
REMOTE_DATABASE_USERNAME=
3338
REMOTE_DATABASE_NAME=
3439
REMOTE_DATABASE_PASSWORD=
3540
REMOTE_DATABASE_IGNORE_TABLES=''
41+
42+
REMOTE_REMOVE_FILE_AFTER_IMPORT=true
43+
REMOTE_IMPORT_FILE=true
44+
```
45+
46+
For only MySQL remote connections:
47+
```
48+
REMOTE_DATABASE_HOST=
49+
REMOTE_DATABASE_USERNAME=
50+
REMOTE_DATABASE_NAME=
51+
REMOTE_DATABASE_PASSWORD=
52+
REMOTE_DATABASE_IGNORE_TABLES=''
53+
54+
REMOTE_REMOVE_FILE_AFTER_IMPORT=true
55+
REMOTE_IMPORT_FILE=true
3656
```
3757

3858
Set a comma seperate list of tables NOT to export in `REMOTE_DATABASE_IGNORE_TABLES`

0 commit comments

Comments
 (0)