mysql 常用命令

来源:互联网 发布:递推算法求韩信点兵 编辑:程序博客网 时间:2024/04/30 11:35

1.导出数据库表
mysqldump -uuser -ppassword -h127.0.0.1 test  mobile_trade>/home/webedit/allen/mobile_trade.sql

2.获得两个时间相减的分钟数

select (sum((UNIX_TIMESTAMP(stopTime) - UNIX_TIMESTAMP(startTime))/60)/count(distinct(uid)))  from mobile_channel_live_info


3.连接其它端口

mysql -uuser -ptest -h173.16.89.104 -Dxiehou -P3306

0 0
原创粉丝点击