URLs
What is a URL?​
Uniform Resource Locators, or URLs are a standardized method for specifying a location of a resource. All the component parts of a URL are shown below:
driver://[username[:password]@]address/[schema|database][?param1=value1&...¶mN=valueN]
An example might look like:
- MySQL
- MariaDB
- PostgreSQL
- SQLite
- Docker
mysql://localhost
mysql://user:pass@localhost
mysql://user:pass@localhost:3306/database
maria://localhost
maria://user:pass@localhost
maria://user:pass@localhost:3306/database
postgres://localhost:5432/database
postgres://localhost:5432/database?search_path=schema
postgres://postgres:pass@0.0.0.0:5432/database?sslmode=disable
sqlite://file.db
sqlite://file?cache=shared&mode=memory
Atlas can spin up an ephemeral local docker container for you by specifying a special URL like below. This can be useful
if you need a dev database for schema validation or diffing. However, some images like mysql
/
mariadb
take quite some time to "boot", before they are ready to be used. For a smoother developing experience
consider spinning up a longer lived container by yourself.
docker://postgres
docker://mariadb/latest
docker://mysql/8/database
SSL/TLS Mode​
The default SSL mode for Postgres is required
. Please follow the
Postgres documentation
for configuring your SSL connection for your database, or set SSL mode to disable
with the search parameter ?sslmode=disable
. For local databases,
disabling SSL is appropriate when inspecting and applying schema changes.
MySQL does not require TLS by default. However, you can require TLS
with the ?tls=true
search parameter.