General :: Script To Mail Mysql Queries?
Feb 15, 2011
I have a daily routine task of checking the size of mysql tables in a database in Mysql Database Server.
I want to achieve this task through a bash script that runs daily and calculate the size of mysql tables and finally mail it to DBA email-id fore.g adarsh.sharma@orkash.com
I try a simple script to mail but it fails .
#!/bin/bash
SUBJECT="Automated Security Alert"
TO="adarsh.sharma@orkash.com"
MESSAGE="/tmp/message.txt"
echo "Security breached!" >> $MESSAGE
echo "Time: `date`" >> $MESSAGE
/bin/mail -s "$SUBJECT" "$TO"
It hangs when I run bash a.sh command. However it creates file in /tmp folder and have all contents.
View 1 Replies
ADVERTISEMENT
Mar 15, 2011
I have prepared a simple script that shows the database, tables size in the Database server as :-
check the attachment for the script & output.
Now I just want to mail the output of my script to some persons e-mail-ID
Also, I want to do some calculations and provide the information of how much increase data after 1 day daily.
View 2 Replies
View Related
Jun 5, 2011
i'm not sure if this is because i'm having problems with my Raid setup, which mysql is running on, or if it is unrelated, but is anyone else noticing that mysql is VERY slow on Fedora 15?
View 5 Replies
View Related
Jun 2, 2010
i am using liferay5.2(mysql included in the download pack) on fedora. while liferay is working fine but i cannot connect to mysql.i am getting the error
[
[root@localhost ~]# ln -s /var/lib/mysql/mysql.sock /tmp
[root@localhost ~]# /etc/init.d/mysqld start
Timeout error occurred trying to start MySQL Daemon.
[code]....
i didnt find the mysql.sock file in the location /var/lib/mysql/mysql.sock. i cannot find the portal-ext.properties file also to make intial settings.
View 9 Replies
View Related
Mar 6, 2010
i want to know about the partition size of linux in my system..i have pentium 4 with 512 mb ram and 15 gb hard disk for opensuse 11.1..i want to know how much space should be allocated for /,/home ,swap etc and under what kind of partition they should be formatted (like primary,logical,extended etc)...kindly help me in this regards...I have windows xp and want to install opensuse with it.
View 2 Replies
View Related
Jan 9, 2009
Is there a way to run queries against a Microsoft sql server from linux? Here is what I would like to do. When I create apps that us db back end I would like to quickly check results of my queries. so if I could do something like "select * form Orders" from the terminal or another app that would be great.
View 6 Replies
View Related
Mar 17, 2010
1. What difference will it make if I set the mount point to "/" instead of "/boot" and vice-versa ?
2. I heard somewhere that the data on a primary partition can be easily recovered in case of some failure.
If it is so then what out of the following should IDEALLY be created as primary partition ?
/usr
/home
/boot
I think /usr and /home both need a primary partition , then what about /boot, Will I be not able to recover something in case of failure if I don't set /boot as a primary partition ?
View 5 Replies
View Related
Sep 11, 2010
I currently have 2 operating systems on my main hdd: Ubuntu and WinXP My current setup - [storage NTFS partition, solely data][17GB WinXP partition][{extended partion}Ubuntu + swap]: [URL] I have a second SATA hdd that I would like to install Arch Linux on to. It uses GRUB Legacy, and Ubuntu uses GRUB 2. I would like to know how I would go about booting this, and figure out where my current bootloader is installed to. i.e. /dev/sda or /dev/sda5 (the / ubuntu partiton)
View 3 Replies
View Related
Jun 9, 2010
I have machine which manages all mail accounts and their traffic and as well mysql database and some more stuff. Theres also windows server where users are managed and they get their programs from over rdp. I have login screen on Linux machine. It says Debian GNU/Linux 5.0. And I have root password, but I know that I have to login first with simple user account after which I can access login as root. But where can I get simple user account info. I need to manage mailaccounts mainly there.
View 3 Replies
View Related
Jan 18, 2010
I want to ask how i set Linux class path for mail.jar and mysql-connector.jar. I have set the class path for java with the command.
Code:
when i do java -version it's work fine.
Also if i want to know that what shell i am using how can i find it.Also what is the command for showing class path variables or how can i see my JAVA_HOME class path.Means after setting the class path for above two files how can i see that these files have added.
When i write echo $CLASSPATH or echo $JAVA_HOME it shows nothing no error but again shows the prompt.
One thing more i want to run a java program on Linux it is in a package (named asteriskproject). It consist of 10 java files. I have run this program on windows using netbeans IDE.For this program i need to set my Linux class path for the above mentioned files, and this is my first time that i am running any program on Linux. So i want to ask how can i run my program. Simply put this asteriskproject directory in any folder and run the main file using javac. Is it right way to run the program that consist of package ?
View 3 Replies
View Related
Aug 7, 2010
How do I create a new mysql user and a mysql database at the shell prompt?
View 1 Replies
View Related
Feb 19, 2010
Mysql starting problem after changing mysqladmin password.I tried all the solutions available on forums, but not solve the problem.At last I restored the mysql db backup, this make mysql service start, but till other databases not showing all tables.
View 1 Replies
View Related
May 13, 2011
I have install mysql on my fedora12. My different mysql server is located in us. I want to check health status and hits per seconds everything. Is it possible with mysql-administrator command.
now a these days i am connect through ssh and excuting below command
#mytop mysql -u root -p <passwd>
In my mysql db i have added the userip & passwd (allowed the privileages for that ip)
If i use mysql-administrator i am getting below error
MySQL Error Nr. 2003
Can't connect to MySQL server on '66.98.152.64' (111)
View 6 Replies
View Related
Jun 14, 2011
I have tried many different ways to interact with the mysql to reset the root mysql pass. This is what I got to right now
Code:
#!/bin/sh
newpass=$1
service mysqld stop
mysqld_safe --skip-grant-tables --skip-networking &
echo "use mysql;" >> /tmp/mysql_pass_reset.txt
echo "update user set password=PASSWORD("$newpass") where User="root";" >> /tmp/mysql_pass_reset.txt
[Code]...
View 6 Replies
View Related
Jul 20, 2011
I have got a nagios server running on my network, The configuration seems to be okay but each time there is a service alert notification, and an e-mail is sent to the contact group, Nagios continuously sends e-mail over and over again. Do anyone know of a way to set Nagios directives to only send one e-mail per alert without it flooding mail boxes.
View 3 Replies
View Related
Nov 15, 2010
I had configured sendmail on linux 5.2, Iam using public ip and my domain is registered[linuxforfreshers.info]. I am facing a issue that when I mail with the user sumit@linuxforfreshers.info then I am able to do it. But if somebody tries to send mail to the same user then it bounce backs. I had made the entry of domain in /etc/mail/local-host-name and also I put ok in /etc/mail/access.The mails are working properly with in LAN. But not able to work on WAN only I can send mail but not able to recieve mail.What else I need to do.
View 6 Replies
View Related
Jan 9, 2011
I am trying to configure mutt to send email via command line . It works fine when I configure it for gmail as follows:Quote:
# SENDING MAIL
set copy=yes
set smtp_url = "smtp://mymail@smtp.gmail.com:587/"
[code]...
View 14 Replies
View Related
Jun 8, 2011
How to configure a Debian mail server as a user send a mail with attachment maximum wight is 5 Mb.
View 3 Replies
View Related
Oct 30, 2010
How can I split my local mail box into an individual files for each mail. The senario of mine is I fetch some emails from a mail server into my local linux box with fetchmail command but I want each fetched mail in a different indivitual file for easy file processing and manipulation for example sending those email through sms and so on
View 1 Replies
View Related
Aug 7, 2011
I need help in setting up the native e-mail client included in Debian Squeeze. My ultimate goal is to have the Debian e-mail client download e-mail messages and process attachments automatically.
View 14 Replies
View Related
Jun 7, 2011
I think this goes here, but I'm not sure. I decided that XAMPP had been troublesome enough. MySQL never worked. So I decided to instal the LAMP stack offered by YaST. I went about installing it thinking that it would all work. But it seems that I was wrong. So I try to start mysql, and here's what I get:
Code:
the-matrix:~ # mysql start
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) or
Code:
the-matrix:~ # rcmysql start
Starting service MySQL warning: /var/mysql/mysql.sock didn't appear within 30 seconds
chmod: cannot access `/var/run/mysql/mysqld.pid': No such file or directory
[Code]...
View 6 Replies
View Related
Mar 10, 2011
I just want to know is it possible to extract a single mail from the mail path i.e. /var/mail/root.
for ex. i am having this mail in /var/mail/root.
From root@localhost.localdomain Thu Mar 10 21:47:47 2011
Return-Path: <root@localhost.localdomain>
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by localhost.localdomain (8.13.8/8.13.8) with ESMTP id p2AGHlx4004190
for <root@localhost.localdomain>; Thu, 10 Mar 2011 21:47:47 +0530
[Code]....
how to extract only this mail from /var/mail/root
View 2 Replies
View Related
Feb 25, 2011
I have configured fetchmail, sendmail/postfix and mutt to act as a relay to receive mail. I can receive mail fine but I cannot send mail. Its working fine on my one box but on the one acting as a nat I am having issues. This is my mail log from the nat box.
Feb 25 03:42:25 TrunkmonkeyNat sendmail[4382]: p1P8gPfd004382: from=root, size=52, class=0, nrcpts=1, msgid=<201102250842.p1P8gPfd004382@localhost.localdomain>, relay=root@localhost
Feb 25 03:42:25 TrunkmonkeyNat sendmail[4383]: p1P8gPgn004383: from=<root@localhost.localdomain>, size=353, class=0, nrcpts=1, msgid=<201102250842.p1P8gPfd004382@localhost.localdomain>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
[Code]....
View 116 Replies
View Related
Mar 16, 2009
All our CentOS servers sync to a windows domain time server and we're migrating to a new CentOS time server. however in testing the setup with the clients I get the following
# ntpdate 10.10.31.211
16 Mar 09:20:46 ntpdate[2646]: no server suitable for synchronization found
checking to see if I can at least query...
# ntpdate -q 10.10.31.211
server 10.10.31.211, stratum 16, offset 17579.121921, delay 0.02591
16 Mar 09:08:07 ntpdate[2606]: no server suitable for synchronization found
so it queried the server and also failed.
View 6 Replies
View Related
Jul 1, 2011
I have two servers relavant here: mail.domain.com (1.1.1.1) - which is the nameserver and the mail server for domain.com. www.domain.com (2.2.2.2) - which is the www subdomain for domain.com domain.com (cname www.domain.com) - an alias for www.
The zone file for domain.com lists mail.domain.com as the MX server for domain.com. 2.2.2.2 is actually being served web pages as a virtual host. It's real hostname is www.anotherdomain.com. Mail for domain.com works pretty well, in general. However, if I attempt to send mail from www.domain.com (or its alias domain.com), I get "mail for domain.com loops back to myself" in the postfix logs. On 2.2.2.2 /etc/postfix/mail.cf has mydestination = www.anotherdomain.com, localhost. How do I tell postfix on 2.2.2.2 that mail for domain.com needs to be delivered to mail.domain.com?
View 1 Replies
View Related
Jun 20, 2010
I would like some help to run sql queries in Ubuntu. For a school IT project, we must write a Java program that runs queries. Seeing that I'm going away on holiday and will be away from my Win7 desktop, I will have to work on my Ubuntu laptop. When I run my program, I get these two sql exceptions:
Code:
sun.jdbc.odbc.JdbcOdbcDriver
No suitable driver found for jdbc:odbc:ITPAT2010
Note: it is not my program that is causing the problem, since it works fine on Win7. But here's my code anyway:
Code:
void OpenDB()
{
System.out.println("INTO BRIDGE");
String url = "jdbc:odbc:ITPAT2010"; //JOU BRUG SE NAAM
[code]....
I believe the drivers that handles the connection to the database aren't installed. The format of my database is: *.accdb (was created on Win7 using Office 2010). I can't open this file, probably because I have no database programs installed?
View 1 Replies
View Related
Jul 5, 2011
I would like configure a DNS server on Debian, only to forward through my ISP DNS servers.
View 4 Replies
View Related
Feb 15, 2010
I am currently running the latest version of Bind, and for some completely unknown reason I can NOT get queries to work for PTR records. All queries to the servers for reverse name lookup get query denied:
Using domain server:
Name: 66.150.173.1
Address: 66.150.173.1#53
Aliases:
Host 27.173.150.66.in-addr.arpa not found: 5(REFUSED)
And it shows in my logs:
I am at my wits ends with the piece of crap. Can anyone shine some light on why this damn Bind install won't respond to these queries?
For reference here is my named.conf:
Code:
View 15 Replies
View Related
Feb 23, 2010
My DNS server used to work flawlessly but for some reason it no longer responds to queries. It seems that named always queries internet root serves!!
View 3 Replies
View Related
Nov 7, 2010
I have internal-only email server that has internal BIND9 running. Thought it only has its IP address defined in /etc/resolv.conf, it is still resolving outside addresses.
View 2 Replies
View Related