mysql 替换不是以http://开头的
查询是以http开头的 select * from tt_archives where thumb REGEXP ‘^http://’
查询不是以http开头的 select * from tt_archives where thumb not REGEXP ‘^http://’
其实我一直在你身边
查询是以http开头的 select * from tt_archives where thumb REGEXP ‘^http://’
查询不是以http开头的 select * from tt_archives where thumb not REGEXP ‘^http://’
导出(不进入mysql)
mysqldump -h10.168.193.2 -uwanyouxicom -p52wyxg7P3v5N7 wanyouxicom wyx_phome_ecms_advert>advert.sql
导入(进入mysql)
source /dir_for_sql_file/sql.sql
mysql -uroot -p1234
create database wiki default charset utf8;
use wiki;
source /your_wiki_sql_file_path/wiki.sql
update by_article set pic_url = replace(pic_url,’oyskpbhvb.bkt.clouddn.com’,’wximg.checheng.cn’)
select date,DATE_FORMAT(date,’%Y%m’) weeks,sum(`install`) install_count,sum(`launches`) launches_count,sum(`active`) active_count from tj_app_day_data where date >=’2017-10-25′ and date<='2017-12-17' group by weeks;
select `date`,DATE_FORMAT(date,’%Y%m’) months,sum(`install`) install_count,sum(`launches`) launches_count,sum(`active`) active_count from tj_app_day_data where appid=’$appid’ and date >=’$start_date’ and date<='$end_date' group by months
GRANT ALL PRIVILEGES ON *.* TO ‘username’@’%’ IDENTIFIED BY ‘password’ WITH GRANT OPTION; 所有数据库所有表
GRANT ALL PRIVILEGES ON xinchuanbo.* TO ‘zzs’@’%’ IDENTIFIED BY ‘123456’ WITH GRANT OPTION; 开通用户:zzs 密码:123456 数据库 xinchuanbo (远程操作)