Cradle / Use Specific Database Details
Use Specific Database Details
Install cradle components using specified database parameters to ensure targeted deployment.
cradle install -h <hostname> -u <username> -p <password> cradle install -h <hostname> -u <username> -p <password> #!/bin/bash
# Use Specific Database Details
cradle install -h {{hostname}} -u {{username}} -p {{password}} import subprocess
# Use Specific Database Details
# Make sure to replace <placeholders> with actual values
def run_command():
cmd = [
"cradle",
"install",
"-h",
"<hostname>",
"-u",
"<username>",
"-p",
"<password>"
]
try:
print(f"Executing: {' '.join(cmd)}")
subprocess.run(cmd, check=True)
except subprocess.CalledProcessError as e:
print(f"Error: {e}")
except FileNotFoundError:
print("Error: cradle not found. Please install it first.")
if __name__ == "__main__":
run_command() When To Use
When connecting to a specific database instance in a managed service environment.
Pro Tip
Make sure the database user has full access rights to avoid permission issues. Validate connection parameters with `ping` before deploying.
Command Builder
Tune the command before you copy it
cradle install -h <hostname> -u <username> -p <password> Terminal Output
Expected runtime feedback
Installing Cradle with specified database details:
Hostname: 192.168.1.100
Username: admin
Password: ********
Cradle installation complete. You can now connect to your database. Anatomy of Output
Understanding the result
Connecting to database: db.example.com as user: admin Connection Details Indicates the intended database connection.
Authentication successful: ✓ Auth Status Shows successful authentication with provided credentials.
Components installed in target database. Installation Summary Confirms successful installation in specified database.
Troubleshooting
Common pitfalls
Error: Access denied for user 'admin'.
Solution: Check and update user permissions in the database.
Error: Unknown database: 'target_db'.
Solution: Ensure the specified database exists before running the command.
Error: Connection timed out.
Solution: Verify network settings or database availability.
Command Breakdown
What each part is doing
-
cradle - Base Command
- The executable that performs this operation. Here it runs Cradle before the shell applies any redirect operators.
-
<hostname> - hostname
- The host or server name supplied to this command.
-
<username> - username
- The user value supplied to this command.
-
<password> - password
- The value supplied for password.
-
-h - Command Option
- Tool-specific option used by this command invocation.
-
-u - Command Option
- Tool-specific option used by this command invocation.
-
-p - Command Option
- Tool-specific option used by this command invocation.
How To Run
Execution path
- Step 1
Run the command: `cradle install -h {{hostname}} -u {{username}} -p {{password}}`
- Step 2
Verify the connection by checking Cradle's status with: `cradle status`
Alternative Approaches
Comparable commands in other tools
Alternative package management tools for the same job.