Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. $ cat foo.php | grep '$dbpwd=' | cut -d '"' -f 2 | mysql -U root -p mydb -h friendserver
  2. Enter password: (holds)
  3.  
  4. $ echo P455w0rd | mysql -u root -p mydb -h friendserver
  5. Enter password: (holds)
  6.  
  7. [client]
  8. user=foo
  9. password=P@55w0rd
  10.  
  11. mysql --defaults-extra-file=<path to the new config file> [all my other options]
  12.  
  13. MYSQLPASS=`cat foo.php | grep '$dbpwd=' | cut -d '"' -f 2`
  14.  
  15. mysql -U root -p ${MYSQLPASS} mydb -h friendserver
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement