Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ cat foo.php | grep '$dbpwd=' | cut -d '"' -f 2 | mysql -U root -p mydb -h friendserver
- Enter password: (holds)
- $ echo P455w0rd | mysql -u root -p mydb -h friendserver
- Enter password: (holds)
- [client]
- user=foo
- password=P@55w0rd
- mysql --defaults-extra-file=<path to the new config file> [all my other options]
- MYSQLPASS=`cat foo.php | grep '$dbpwd=' | cut -d '"' -f 2`
- mysql -U root -p ${MYSQLPASS} mydb -h friendserver
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement