用法:
$ mysql -h rds-server -u root -p -e "SELECT field1, field2 FROM db_name.table_name" | grep "^Keyword" | sed 's/\t/","/g' | sed 's/^/"/g' | sed 's/$/"/g' > db-table-export.csv
其中 grep 那段只是為了mysql 輸出時,略過第一行 XD
$ mysql -h rds-server -u root -p -e "SELECT field1, field2 FROM db_name.table_name" | grep "^Keyword" | sed 's/\t/","/g' | sed 's/^/"/g' | sed 's/$/"/g' > db-table-export.csv
$ sudo apt-get install php5
$ sudo dpkg -P apache2
$ dpkg --get-selections | grep deinstall | xargs sudo dpkg -P
30 天 * [10000 * 0.0075/10000 (HTTP) + 10000 * 100kb * 0.02/GB (DATA) ] = 30 * (0.075 + 0.01907) 美金附近 = 2.82 美金對於費用部分,建議連上官網觀看,例如各地費用皆不同等:http://aws.amazon.com/tw/cloudfront/pricing/
$ git clone https://github.com/Synchro/PHPMailer.git
$ vim PHPMailer/AWS-SES-test.php
<?php
require 'PHPMailerAutoload.php';
$mail = new PHPMailer;
$mail->SMTPDebug = 3;
$mail->isSMTP();
$mail->Host = 'email-smtp.us-west-2.amazonaws.com';
$mail->SMTPAuth = true;
$mail->Username = 'YourSMTPUsername';
$mail->Password = 'YourSMTPPassword';
$mail->SMTPSecure = 'tls';
$mail->Port = 587;
$mail->From = 'YourSenderEmail';
$mail->FromName = 'Mailer';
$mail->addAddress('YourTargetEmail');
$mail->isHTML(true);
$mail->Subject = 'Here is the subject';
$mail->Body = 'This is the HTML message body <b>in bold!</b>';
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
if(!$mail->send()) {
echo 'Message could not be sent.';
echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
echo 'Message has been sent';
}
$ php PHPMailer/AWS-SES-test.php
The id of this person's user account. This ID is unique to each app and cannot be used across different apps. Our upgrade guide provides more info about this.