有的时候不想进入mysql 可以使用如下sql
mysql -uroot -p123456 -e "show variables like '%cache%'"
mysql -u root -p -e "use zxlh; select * from test"
#数据写入文件
mysql -uroot -p123456 -e "use zxlh;select * from test;">/opt/soft/mysql/data/test.sql
Warning: Using a password on the command line interface can be insecure. 可以忽略 只是警告
#mysqladmin 直接查看参数 每2秒一次
mysql extended-status -r -i 2 grep open_tables
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/30127122/viewspace-2134064/
,如需转载,请注明出处,否则将追究法律责任。