Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 00 16,18,19,20,21 * * * mysql -h MY-DB-HOST.COM -u MY-DB-USERNAME -pMY-DB-PASSWORD -e "delete from hotaru_posts where post_id in ( select post_id from ( select post_id from hotaru_posts a group by post_title having count(post_title) > 1 ) b )" >> /tmp/cron_job.log
- 00 8,14,18,19,20,21,23 * * * /usr/local/bin/php /home/aikaforum/cata/public_html/cron_dup.php >> /cata/tmp/cron_dup.log
- <?php
- $username="xxxxxxx";
- $password="xxxxxx";
- $dbname="xxxxxx";
- $dbhost="xxxxx.xxxxx.com";
- $query="delete from hotaru_posts where post_id in ( select post_id from ( select post_id from hotaru_posts a group by post_title having count(post_title) > 1 ) b )";
- mysql_connect($dbhost,$username,$password);
- @mysql_select_db($dbname) or die(strftime('%c')." Unable to select database");
- mysql_query($query);
- mysql_close();
- echo strftime('%c')." ok!";
- ?>
- echo "your_SQL_statement" | mysql --skip-column-names -udbuser -pdbpassword yourdb >> yourlog.log
- mysql -u username dbname -e "delete from posts" > foo
- cat foo
- (empty file)
- 00 16,18,19,20,21 * * * /usr/local/mysql/bin/mysql -h MY-DB-HOST.COM -u .....
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement