在shell中操作mysql

mysql -h(IP地址) -u(用户名) -p(密码) -P(端口) -D(数据库) -e “sql语句”

mysql -h 172.25.25.42 -uroot -pmypassword -P3306 -D wyLoging 
-e "update Task t set t.content='$line' where t.taskid='$5' and t.username='$4'"

你可能感兴趣的:(linux)