Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backup fails when backing up MySql db which has read / write hosts #163

Closed
amochohan opened this issue Jul 11, 2016 · 3 comments
Closed

Comments

@amochohan
Copy link

I have a database connection defined as follows:

'mysql' => [
        'read' => [
            'host' => env('DB_READ_HOST', 'localhost'),
        ],
        'write' => [
            'host' => env('DB_WRITE_HOST', 'localhost')
        ],
        'driver'    => 'mysql',
        // Other parameters
    ],

When I try to run php artisan backup:run, I see the Backup failed because: Undefined index: host. error, because I am not setting a host directly.

There should be a check performed to check if there is a read host first, and if there isn't, use the host value of the database connection.

@freekmurze
Copy link
Member

freekmurze commented Jul 19, 2016

Yup, this should be fixed. I'll try to make some time for this in the coming weeks. I'd also accept a PR if you need this quick. Be sure to add tests.

@freekmurze
Copy link
Member

Support for read database connections has been added in v4.1.0 of this package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants