... | ... | @@ -26,7 +26,13 @@ Bashhub saves a copy of a command exactly as it's recorded in your history. Cred |
|
|
```bash
|
|
|
$ mysql -u bob -p plain-text-password # This is bad practice in general.
|
|
|
```
|
|
|
Good practice is to not plain text user information and have it stored else where e.g.
|
|
|
Good practice is to not plain text user information instead use a prompt e.g.
|
|
|
|
|
|
```bash
|
|
|
$ mysql -u "$DB_USER" -p # Best Practice. Prompts you for a password.
|
|
|
```
|
|
|
|
|
|
Instead of prompting, you could also set an environment variable.
|
|
|
|
|
|
```bash
|
|
|
$ mysql -u "$DB_USER" -p "$DB_PASSWORD" # This is better practice.
|
... | ... | |