由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Linux版 - 新手问:mysql和shell
相关主题
还是不会设置mail serverlinux的smtp,那个postfix
求助:一个sendmail的问题brute force ssh attack by script kiddie
ft. postfix! postfix!UBUNTU 配置email服务器(用SMTP)
真心请教关于mail server的问题mail server setup
谁知道 muttrc 里面 date_format 怎么设置能显示 14 Apr 21:23centos 6 stunnel
包子求教linux下ssh tunneling到一个host的mysqlDesktop的Ubuntu怎么用命令行收发邮件?
how to send an email in command line?Cannot send out email on Centos 5.2 ?
如何从我的ubuntu linux 发邮件到我的gmail 账号电子邮件被黑的问题,先谢了!
相关话题的讨论汇总
话题: mysql话题: muttrc话题: mutt话题: error话题: shell
进入Linux版参与讨论
1 (共1页)
m**v
发帖数: 373
1
新手,mysql在centos下。
我想建立一个script,这个script登录到mysql,
执行一个query,然后把结果email出来。
大家指点一下?
h*******c
发帖数: 248
2
echo "SELECT .... " |mysql -u username --password=password
databasename|mailx -s subject y*******[email protected]

【在 m**v 的大作中提到】
: 新手,mysql在centos下。
: 我想建立一个script,这个script登录到mysql,
: 执行一个query,然后把结果email出来。
: 大家指点一下?

m**v
发帖数: 373
3
多谢了!
email给local user可以,可是总是发不到外面的
address比如gmail.com,我的linux是在我自己的XP里面的一个VM,
有什么办法?

【在 h*******c 的大作中提到】
: echo "SELECT .... " |mysql -u username --password=password
: databasename|mailx -s subject y*******[email protected]

h*******c
发帖数: 248
4
If in general your linux box can't send mail to outside world, I don't
have a command to do that. However if you know your smtp server (it's
likely provided by your ISP), you can write a short "perl" to do that.
you may read
http://perldoc.perl.org/Net/SMTP.html
Or
http://serverfault.com/questions/38919/send-an-email-with-an-attached-
file-using-telnet-or-netcat
for simply using telnet

【在 m**v 的大作中提到】
: 多谢了!
: email给local user可以,可是总是发不到外面的
: address比如gmail.com,我的linux是在我自己的XP里面的一个VM,
: 有什么办法?

j**********8
发帖数: 189
5
install mutt , postfix or sendmail

【在 m**v 的大作中提到】
: 多谢了!
: email给local user可以,可是总是发不到外面的
: address比如gmail.com,我的linux是在我自己的XP里面的一个VM,
: 有什么办法?

J********a
发帖数: 5208
6
mutt + gmail is the key
but not very secure

【在 j**********8 的大作中提到】
: install mutt , postfix or sendmail
N**********d
发帖数: 9292
7
mysql -uUSERNAME -pPASSWORD -Ddatabasename -e "select ....." > filename
然后用可用的Email软件发送就好了

【在 m**v 的大作中提到】
: 新手,mysql在centos下。
: 我想建立一个script,这个script登录到mysql,
: 执行一个query,然后把结果email出来。
: 大家指点一下?

m**v
发帖数: 373
8
安装了mutt,根据这里设置.muttrc文件
http://tuxtraining.com/2009/01/24/using-gmail-with-mutt-the-minimal-way-imap-update
运行mutt的时候出错:
Error in /root/.muttrc, line 3: smtp_url: unknown variable
Error in /root/.muttrc, line 4: smtp_pass: unknown variable
Error in /root/.muttrc, line 12: header_cache: unknown variable
Error in /root/.muttrc, line 13: message_cachedir: unknown variable
source: errors in /root/.muttrc
难道这些variable不合法?

【在 J********a 的大作中提到】
: mutt + gmail is the key
: but not very secure

R****a
发帖数: 199
9
depends on your setting, but you can try the following:
in shell, use the command,
mysql --database=$dbname -p$pswd -e "$yourquer" > $outputfile
Then you try to send this output file to a mail recipient.

【在 m**v 的大作中提到】
: 新手,mysql在centos下。
: 我想建立一个script,这个script登录到mysql,
: 执行一个query,然后把结果email出来。
: 大家指点一下?

1 (共1页)
进入Linux版参与讨论
相关主题
电子邮件被黑的问题,先谢了!谁知道 muttrc 里面 date_format 怎么设置能显示 14 Apr 21:23
【新手请教】64mb系统装amp和vpn有问题么?包子求教linux下ssh tunneling到一个host的mysql
求助,linux下的smtphow to send an email in command line?
向 zher 同学道个歉如何从我的ubuntu linux 发邮件到我的gmail 账号
还是不会设置mail serverlinux的smtp,那个postfix
求助:一个sendmail的问题brute force ssh attack by script kiddie
ft. postfix! postfix!UBUNTU 配置email服务器(用SMTP)
真心请教关于mail server的问题mail server setup
相关话题的讨论汇总
话题: mysql话题: muttrc话题: mutt话题: error话题: shell