plugins.sh file, then you’ll be prompted to authenticate the MySQL CLI with biometrics.
Requirements
- Sign up for 1Password.
- Install and sign in to 1Password for Mac or Linux.
- Install 1Password CLI 2.9.0 or later.
- Integrate 1Password CLI with the 1Password app.
- Install the MySQL CLI.
- Bash
- Zsh
- fish
Step 1: Configure your default credentials
Step 2: Source the plugins.sh file
To make the plugin available, source your plugins.sh file. For example:
The file path for your op folder may vary depending on your configuration directory. op plugin init will output a source command with the correct file path.
If this is your first time installing a shell plugin, you’ll also need to add the source command to your RC file or shell profile to persist the plugin beyond the current terminal session. For example:
Step 3: Use the CLI
Step 4: Remove imported credentials from disk
After saving your credentials in 1Password, you can remove all local copies you previously had stored on disk.
Next steps
1Password Shell Plugins support more than 60 third-party CLIs. To see a list of supported CLIs:
To choose another plugin to get started with:
To use shell plugins for seamless context switching, learn how to configure a plugin in multiple environments or with multiple accounts.
Get help
Reference
If you saved your MySQL credentials in 1Password manually rather than usingop plugin to import a new item, make sure that your field names match the table below.
If your credentials are stored in a different field, you’ll be prompted to select the field manually. Field names are case-insensitive. Field name tokens can be separated by whitespaces, underscores, dashes, or nothing.
| 1Password field name | Parameter |
|---|---|
| Host (optional) | host |
| Port (optional) | port |
| User (optional) | user |
| Password | password |
| Database (optional) | database |