Comments (6)
Hey @calvin2021y ๐๐ป
Yes, please check out this comment #1034 (comment):
As the command accepts a URL, the standard way for dealing with odd characters is using URL encoding, see IETF RFC 1738, (see section 2.2) which defines URLs formally. I don't think Atlas should encode the URL for the user as this is a one-time operation (e.g doesn't change unless the password itself changes).
from atlas.
even so, add a arguments to accept raw password will be much easy for users.
from atlas.
Agree. Thatโs why we added urlescape
to Atlas configuration.
from atlas.
Can i use this from bash command without change code ?
from atlas.
Create an atlas.hcl
file and use the urlescape
function. The URL (of an actual database) should not be stored in the file but injected as a variable or read from some secrets store (Atlas supports this too). For example:
variable "url" {
type = string
default = "<local url"> // Can also be defined as: getenv("DATABASE_URL")
}
env "mysql" {
url = urlescape(var.url)
src = "file://test.hcl"
# In case you use and want to define a dev-database.
dev = "docker://mysql/8/dev"
}
atlas schema apply \
--env mysql \
--var "url=mysql://test:+ysT*Au-83b57X9^t2@mysql:3306/test"
from atlas.
thanks for the tips, after some research I find this tools work suit me need.
trurl --url mysql://MYSQL_HOST --set port=$MYSQL_PORT --set user=$MYSQL_USER --set password=$MYSQL_PWD
from atlas.
Related Issues (20)
- Atlas Kubernetes Operator, getting error when migration has "CREATE INDEX CONCURRENTLY" HOT 6
- Integration of AtlasGo with an existing target database HOT 1
- Unable to apply changes if schema contains ENUM HOT 3
- Create Nix package HOT 4
- operator: improve logging and explain what the operator does
- external_schema doesn't work with `atlas schema diff` HOT 2
- Atlas cannot parse 'double unsigned zerofill' correctly on MySQL HOT 7
- Add support for NULLS NOT DISTINCT
- Postgres: missing FK constraints for non-owner
- CLI: atlasgo.sh installer ignoring `ATLAS_FLAVOR="community"` HOT 5
- Support libsql+ws:// scheme for local environment libSQL databases HOT 7
- `AUTO_INCREMENT` do not work with `atlas schema diff` in mysql
- Unexpected view definition on v0.13.0 HOT 16
- when use schema_diff with error executing "schema_diff" at <sql $>: error calling sql: alter table "xxx": unexpected attribute change (expect IDENTITY): [] HOT 3
- Generating migration for time field with default value is not working HOT 1
- duplicate table names breaks schema inspect HOT 1
- uuid_generate_v4() does not exist error HOT 14
- SQL Schema Directory leads to `Error: sql/migrate: read migration directory state` HOT 2
- [Question]: Using variables from `atlas.hcl` env inside CLI command HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atlas.