Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm reposting this question because the previous one was closed as being answered by a related post here but it wasn't.

That post is saying how to access the mysqls using raw commands. My question has to do with how LARAVEL handles it - because I use eloquent and laravel relationships to handle all the pivots, etc.


So I have a multi-DB setup which I thought was working (well it does, but the caveat is the title)

I'm currently using two databases, one for the actual app we're developing, and another DB specifically for user accounts.

Here's the snippet on the ENV side:

DB_CONNECTION=mysql
DB_HOST=APP_SERVER_IP
DB_PORT=APP_SERVER_PORT
DB_DATABASE=APP_SERVER_DB
DB_USERNAME=APP_SERVER_USER
DB_PASSWORD=APP_SERVER_PASS

DB_CONNECTION_SH=mysql
DB_HOST_SH=ACCOUNTS_SERVER_IP
DB_PORT_SH=ACCOUNTS_SERVER_PORT
DB_DATABASE_SH=ACCOUNTS_SERVER_DB
DB_USERNAME_SH=ACCOUNTS_SERVER_USER
DB_PASSWORD_SH=ACCOUNTS_SERVER_PASS

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
3.2k views
Welcome To Ask or Share your Answers For Others

1 Answer

等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...