Skip to content

Dedicated database host for stored_events? #378

Answered by rapkis
ahoiroman asked this question in Q&A
Discussion options

You must be logged in to vote

Hi! Here's how I did it:

  • Defined a new database connection in config/database.php. I've made it basically the same as the default mysql entry. Here's how it may look:
    'event_sourcing_mysql' => [
            'driver' => 'mysql',
            'url' => env('EVENT_SOURCING_DATABASE_URL'),
            'host' => env('EVENT_SOURCING_DB_HOST', '127.0.0.1'),
            'port' => env('EVENT_SOURCING_DB_PORT', '3306'),
            'database' => env('EVENT_SOURCING_DB_DATABASE', 'forge'),
            'username' => env('EVENT_SOURCING_DB_USERNAME', 'forge'),
            'password' => env('EVENT_SOURCING_DB_PASSWORD', ''),
            'unix_socket' => env('EVENT_SOURCING_DB_SOCKET', ''),
        …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ahoiroman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants