Tag Info

New answers tagged


If you want to start mysql with a password provided you have to fetch the password in a variable first: MYSQLPASS=`cat foo.php | grep '$dbpwd=' | cut -d '"' -f 2` Then you can start your mysql command with: mysql -U root -p ${MYSQLPASS} mydb -h friendserver


You have to be very careful how you pass passwords to command lines as, if you're not careful, you'll end up leaving it open to sniffing using tools such as ps. The safest way to do this would be to create a new config file and pass it to mysql using either the --defaults-file= or --defaults-extra-file= command line option. The difference between the two ...


Probably a limit of the terminal device line discipline internal line editor buffer. You should be able to enter long lines by pressing Ctrl+D in the middle of it (so the currently entered part be sent to cat and the line editor flushed), or by disabling that line editor altogether. For instance, if using zsh: STTY=-icanon cat > file Note that then ...

Top 50 recent answers are included