terminus-plugin-project / terminus-replica-plugin
Terminus Replica - 一个用于暴露 Pantheon 环境副本数据库连接详情的 Terminus 插件。
1.0.0
2017-03-01 07:49 UTC
README
Replica 是一个 Terminus 插件,它为你的站点环境可能启用的任何数据库副本装饰了 terminus connection:info
命令,并提供了额外的连接信息。
安装
有关安装帮助,请参阅 管理插件。
mkdir -p ~/.terminus/plugins composer create-project -d ~/.terminus/plugins terminus-plugin-project/terminus-replica-plugin:~1
使用方法
如果你获取了一个具有关联从数据库的环境的连接信息,你将看到额外的详细信息
terminus connection:info <site>.<env>
...可能会响应
----------------------- ---------------------------------------------------------------------------------------------------------------------------------------
SFTP Command sftp -o Port=2222 live.aaaaaaaa-0000-bbbb-1111-cdef2345ghij@appserver.live.aaaaaaaa-0000-bbbb-1111-cdef2345ghij.drush.in
MySQL Command mysql -u pantheon -p12a345b678cd9012efgh345i67890123 -h dbserver.live.aaaaaaaa-0000-bbbb-1111-cdef2345ghij.drush.in -P 10206 pantheon
Redis Command redis-cli -h 13.37.13.37 -p 10000 -a aa1b23456cde789fgh0ij1234k56l7m8
MySQL Replica Command mysql -u pantheon -p01ab234c567d8e90fgh1i23j4kl5678m -h 133.71.33.7 -P 11258 pantheon
----------------------- ---------------------------------------------------------------------------------------------------------------------------------------
通常,你可以指定你想要的字段
terminus connection:info my-site.live --field=mysql_replica_command
...可能会返回
mysql -u pantheon -p01ab234c567d8e90fgh1i23j4kl5678m -h 133.71.33.7 -P 11258 pantheon