Posts List

Mysql技巧积累(持续更新中...)

Mysql技巧积累(持续更新中...)

1. mysql 5.6源 yum安装 wgethttp://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm rpm -Uvh mysql-community-release-el6-5.noarch.rpm yum install mysql-server mysql-devel -y 2. mysql 每天删除只保留3个月的数据 mysql -hxxx -uxx -pxxx deploy_api -e 'delete from upload_file where upload_datetime < date_add(now(), interval -3 month);'