Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
There are multiple ways to do this. Just picked two that I find more usable (not very insecure or hard to do). Use a configuration file to store the credentials mysql --defaults-extra-file=/f...
Answer
#2: Post edited
- There are multiple ways to do this. Just picked two that I find more usable (not very insecure or hard to do).
- 1. Use a configuration file to store the credentials
- mysql --defaults-extra-file=/full/path/to/config.cnf
- and the configuration file should contain the login data:
- [client]
- user = "user"
- password = "password"
- host = "host"
- 2. Keep the command, but filter out the error by piping a grep command:
- mysql <options> 2>&1 | grep -v "Warning: Using a password"
Credits: [this](https://stackoverflow.com/a/20854048/2780791) and [this](https://stackoverflow.com/a/34817954/2780791).
- There are multiple ways to do this. Just picked two that I find more usable (not very insecure or hard to do).
- 1. Use a configuration file to store the credentials
- mysql --defaults-extra-file=/full/path/to/config.cnf
- and the configuration file should contain the login data:
- [client]
- user = "user"
- password = "password"
- host = "host"
- 2. Keep the command, but filter out the error by piping a grep command:
- mysql <options> 2>&1 | grep -v "Warning: Using a password"
- Credit: [this](https://stackoverflow.com/a/20854048/2780791) and [this](https://stackoverflow.com/a/34817954/2780791).
#1: Initial revision
There are multiple ways to do this. Just picked two that I find more usable (not very insecure or hard to do). 1. Use a configuration file to store the credentials mysql --defaults-extra-file=/full/path/to/config.cnf and the configuration file should contain the login data: [client] user = "user" password = "password" host = "host" 2. Keep the command, but filter out the error by piping a grep command: mysql <options> 2>&1 | grep -v "Warning: Using a password" Credits: [this](https://stackoverflow.com/a/20854048/2780791) and [this](https://stackoverflow.com/a/34817954/2780791).