Gords(Go-rds) is simple cli tool written by Golang.
Describe your DB Instances and connecting to DB.
You need install SQL client apps for each DB Engine(e.g. mysql,psql,mssql-cli and sqlplus64 ) before use Gords.
The default value for each DB Engine and SQL client apps is below.
# Client App : DB Engine
mysql : mysql,aurora,aurora-mysql
mysql : mariaDB
psql : postgres,aurora-postgresql
mssql-cli : sqlserver-ee,sqlserver-se,sqlserver-ex,sqlserver-web
sqlplus64 : oracle-ee,oracle-se2,oracle-se1,oracle-se
You can change clients for use config file. Please check Config for more details.
Gords need Shared Creentials File(.aws/credentials
) to use AWS SDK for Go. So, Plese specify credentials before use. If you already use other SDKs and tools (like the AWS CLI), you don't need to change anything.
Use IAM roles for Amazon EC2 if you running Gords on an Amazon EC2 instance. Attach IAM roles to EC2 and you can run Gords. Please check AWS Documents for more details.
You need following API permissions to use Gords.
- DescribeDBInstances
- DescribeDBClusters
Installiing Gords is easy. Use go get
to install the latest version of tool.
$ go get -u github.com/pottyasu/gords
$ gords version
It is simple, run gords
command.
Use help(-h
) option for more details.
$ gords -h
$ gords -r us-east-1
Please note AWS region will not load from your AWS profile. Use -r
option if you need change AWS region.
$ gords -p my-profile
$ gords -u yourname
$ gords -c
...
mysql -h mysql–instance1.123456789012.ap-northeast-1.rds.amazonaws.com -P 3306 -u root -p
Here is sample config. Please note Gords search $HOME/.goods/gords_config.yaml
first. If there are no exist, Gords search current directory(./gords_config.yaml
) where you are running Gords.
# Amazon RDS for MySQL / Amazon Aurora Mysql-compatible
mysqlClient: mysql
# Amazon RDS for MariaDB
mariaClient: mysql
# Amazon RDS for PostgreSQL / Amazon Aurora postgresql-compatible
postgresClient: psql
# Amazon RDS for SQL Server
mssqlClient: mssql-cli
# Amazon RDS for Oracle
oracleClient: sqlplus64