Re: Script for cleaning data on a regular basis

2012-01-27 Thread walter harms
Am 26.01.2012 18:45, schrieb HalXsz SXndor: > 20120126 10:34 AM +0200, a bv > Database contains > tables (structures?) which gets montly data , and these tables are > named as > > name1_name2_ yearmonth . I only want to have the whole database system > for last 2 years, and automaticly

Re: Script for cleaning data on a regular basis

2012-01-27 Thread Karen Abgarian
The original problem is traditionally resolved by partitioning the tables by historical range and creating a database job/event to drop older partitions and add the new ones. Depending on the environment, some might prefer shell scripts to do essentially the same. On Jan 27, 2012, at 3:08

Re: Script for cleaning data on a regular basis

2012-01-27 Thread Johan De Meersman
- Original Message - > From: "Halász Sándor" > > Therefore, it well may be easier to do it all in PHP, since therewith I agree with the assessment, but I take issue with this whole "do it in PHP/Python/language-of-the-month". Why would I want to install PHP, Python or whatever on a da

Re: Script for cleaning data on a regular basis

2012-01-26 Thread Hal�sz S�ndor
20120126 10:34 AM +0200, a bv Database contains tables (structures?) which gets montly data , and these tables are named as name1_name2_ yearmonth . I only want to have the whole database system for last 2 years, and automaticly clean the data which became more than 2 years old , so i ne

Re: Script need for dropping databases

2011-11-18 Thread Nuno Tavares
Hi , Have a look at database information_schema.TABLES: SELECT * FROM information_schema.TABLES WHERE TABLE_SCHEMA=''; As long as your MySQL version is >= 5.1, you don't need a cron script, you can use the MySQL scheduler, create a stored procedure that will run each month. You'll need to use pr

Re: Script need for dropping databases

2011-11-18 Thread Mohan L
On Fri, Nov 18, 2011 at 1:32 PM, a bv wrote: > Hi, > I have a linux box running mysql plus phpmyadmin which has tables > getting montly data and when a new month starts a new table is > created. I want to store only 2 years of data so when a new month > starts i need to drop the table which b

Re: Script to mail output of select query

2011-03-15 Thread Johan De Meersman
- Original Message - > From: "Adarsh Sharma" > > Please check the attachment for the script & output. Thanks for your password :-) > Now I just want to mail the output of my script to some persons > e-mail-ID Assuming you run this from crontab, just set MAILTO=per...@domain.ext right

RE: script of mysql

2010-08-02 Thread Travis Ard
Sorry, I am not aware of a windows-specific version.  You might check with the script author, or you may be able to get this to work on windows by installing cygwin and using a bash shell. -Travis > Date: Mon, 2 Aug 2010 12:20:57 +0100 > Subje

Re: script of mysql

2010-08-02 Thread PRATIKSHA JAISWAL
Hi Travis, Thanks a lot for your help, Can i have a same scrip for windows OS. On Sat, Jul 31, 2010 at 3:29 AM, Travis Ard wrote: > > Something like this mysql-summary script might be useful: > http://code.google.com/p/aspersa/wiki/mysql_summary > > -Travis > > ---

RE: script of mysql

2010-07-30 Thread Travis Ard
Something like this mysql-summary script might be useful: http://code.google.com/p/aspersa/wiki/mysql_summary -Travis > Date: Fri, 30 Jul 2010 12:19:07 +0100 > Subject: script of mysql > From: pratikshadjayswa...@gmail.com > To: mysql@lists.mysql.com > >

Re: script of mysql

2010-07-30 Thread walter harms
PRATIKSHA JAISWAL schrieb: > Hi List, > > Can somebody please help me if they have a script using which we can get an > idea for installed mysql server, backup, created databases, indexes, tables, > engines, replication etc... > > I will appreciate your help in advance > > You can find t

Re: SCRIPT OR TOOL TO GIVE CHANGES IN DATABASES

2007-08-29 Thread Ananda Kumar
Hi All, Also, i guess u can use tools like TOAD or sqltools to get reports on db changes. regards anandkl On 8/29/07, Edoardo Serra <[EMAIL PROTECTED]> wrote: > > Hi Krishna, >you can use MySQL binlog to see queries that made changes to db > data > > Hope it helps > > Regards > > Krishna

Re: SCRIPT OR TOOL TO GIVE CHANGES IN DATABASES

2007-08-29 Thread Edoardo Serra
Hi Krishna, you can use MySQL binlog to see queries that made changes to db data Hope it helps Regards Krishna Chandra Prajapati ha scritto: Hi All, Is there is any script or tool that generate the report and send an email for changes done in the databases; There is any otherway (man

Re: SCRIPT OR TOOL TO GIVE CHANGES IN DATABASES

2007-08-29 Thread Alex Arul Lurthu
If you want to track the schema level changes, updates, inserts etc you always have the binlogs/update logs. If you want to track select queries also you have the general query log. Check out http://dev.mysql.com/doc/refman/4.1/en/log-files.html for the different logs available. Of course be wary o

RE: Script run how???

2006-05-01 Thread George Law
perl ? just quickly throwing something together - this is untested. $done = 0; $count = 0; while ($done) { $dbh->do("analyze table t1"); my $info = $dbh->{mysql_info}; if ($info =~ /some kind of error message/) { $dbh->do("repair table t1"); my $info2 = $dbh->

Re: script error in program.

2006-01-11 Thread Michael Dykman
A couple of things. first: as documented in http://ca3.php.net/mysql_connect, the third (optional) parameter is supposed to be the password, so if the password for root has been left blank, this connect statement cannot succeed. It may well be the only immediate problem. second:

Re: script error in program.

2006-01-11 Thread John Meyer
Jon Miller wrote: Having an error in a script that I cannot figure out why it's not working. The problem is on line 15 "while ($row = mysql_fetch_object" ($result)). What, exactly is the error? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: Script question

2004-10-20 Thread SGreen
Just so everyone is up to speed: The "system" client command is only available on Unix-like systems. To quote: http://dev.mysql.com/doc/mysql/en/mysql_Commands.html >>The edit, nopager, pager, and system commands work only in Unix. << So depending on your OS, that command may or may not be avai

Re: Script question

2004-10-19 Thread Gerald Taylor
Philippe Poelvoorde wrote: mysql> system echo hi there; mysql> system ls -ls; mysql> system uname-a; all work on the 2.4.22-10mdk kernel and the semi-colon is optional. mysql> system echo "hi there" should be also working, the first parameters 'echo' is recognized as the command to execute, and

Re: Script question

2004-10-19 Thread Philippe Poelvoorde
mysql> system echo hi there; mysql> system ls -ls; mysql> system uname-a; all work on the 2.4.22-10mdk kernel and the semi-colon is optional. mysql> system echo "hi there" should be also working, the first parameters 'echo' is recognized as the command to execute, and the folowings strings the

Re: Script question

2004-10-18 Thread Rhino
Thanks, Charles! Your suggestion about removing the quotes and apostrophes altogether did the trick! Rhino - Original Message - From: "Sweet, Charles E" <[EMAIL PROTECTED]> To: "mysql" <[EMAIL PROTECTED]> Sent: Monday, October 18, 2004 9:22 PM Subj

Re: Script question

2004-10-18 Thread Brian
ssage - > From: "Brian" <[EMAIL PROTECTED]> > To: "Rhino" <[EMAIL PROTECTED]> > Cc: "Logan, David (SST - Adelaide)" <[EMAIL PROTECTED]>; "mysql" > <[EMAIL PROTECTED]> > Sent: Monday, October 18, 2004 9:09 PM > Su

RE: Script question

2004-10-18 Thread Sweet, Charles E
n; should the 'system' command >> be there? I'm running Linux Mandrake 9.1. Maybe 'system' is only >> available on some of the Unix platforms but not Mandrake >> 9.1?? >> >> >> >> Rhino >> >> - Original Message -

Re: Script question

2004-10-18 Thread Rhino
o - Original Message - From: "Brian" <[EMAIL PROTECTED]> To: "Rhino" <[EMAIL PROTECTED]> Cc: "Logan, David (SST - Adelaide)" <[EMAIL PROTECTED]>; "mysql" <[EMAIL PROTECTED]> Sent: Monday, October 18, 2004 9:09 PM Subject: Re: Scrip

Re: Script question

2004-10-18 Thread Brian
some of the Unix platforms but not Mandrake > 9.1?? > > > > Rhino > > - Original Message - > From: "Logan, David (SST - Adelaide)" <[EMAIL PROTECTED]> > To: "Rhino" <[EMAIL PROTECTED]>; "mysql" <[EMAIL PROTECTED

Re: Script question

2004-10-18 Thread Rhino
I'm running Linux Mandrake 9.1. Maybe 'system' is only available on some of the Unix platforms but not Mandrake 9.1?? Rhino - Original Message - From: "Logan, David (SST - Adelaide)" <[EMAIL PROTECTED]> To: "Rhino" <[EMAIL PROTECTED]>; "

Re: Script question

2004-10-18 Thread Victor Pendleton
ave both executed successfully via: mysql -u myid -pmypass < Load.sql > Load.out Rhino - Original Message - From: "Logan, David (SST - Adelaide)" <[EMAIL PROTECTED]> To: "Rhino" <[EMAIL PROTECTED]>; "mysql" <[EMAIL PROTECTED]> Sent: Monday, O

RE: Script question

2004-10-18 Thread Logan, David (SST - Adelaide)
I'm confused as to what you are trying to do. Sorry 8-) Regards David Logan Database Administrator HP Managed Services 148 Frome Street, Adelaide 5000 Australia +61 8 8408 4273 - Work +61 417 268 665 - Mobile +61 8 8408 4259 - Fax -Original Message- From: Rhino [mailto:[EMAIL PR

Re: Script question

2004-10-18 Thread Rhino
.out Rhino - Original Message - From: "Logan, David (SST - Adelaide)" <[EMAIL PROTECTED]> To: "Rhino" <[EMAIL PROTECTED]>; "mysql" <[EMAIL PROTECTED]> Sent: Monday, October 18, 2004 8:09 PM Subject: RE: Script question After re-reading your

RE: Script question

2004-10-18 Thread Logan, David (SST - Adelaide)
After re-reading your email in not so quite a rush 8-) Further to that, you can use the system command to run an OS command eg. system "echo thing"; mysql> system echo "thing"; thing mysql> Regards David Logan Database Administrator HP Managed Services 148 Frome Street, Adelaide 5

RE: Script question

2004-10-18 Thread Logan, David (SST - Adelaide)
Hi Rhino, This works, however I can't remember how to suppress the column heading. If you can do that, you can put anything you like in. [EMAIL PROTECTED] loganda]$ echo "set @thing='here we go';select @thing"| mysql -u root -p >outfile Enter password: [EMAIL PROTECTED] loganda]$ cat outfile @t

RE: Script to purge

2004-07-09 Thread Mark Steele
Hi Luis, I've made a small script to do this, it's in the 'backing up mysql databases' on http://www.control-alt-del.org/code Basically, you probably want to save the binary logs by archiving them (in case of a database crash). On a binary log I get about 60-80% compression ratios, so it's worth

Re: Script to purge

2004-07-07 Thread Jeremy Zawodny
On Wed, Jul 07, 2004 at 07:42:46PM +0200, Luis Mediero wrote: > Hi, > > I would like write a script to purge every nigth the master log with a cron > process. I need do it every nigth after load a lot of data into the master. > I know if i do 'show master status' i can see the file_name of t

Re: Script to purge

2004-07-07 Thread gerald_clark
We delete all binlogs over 7 days old. We figure that if a slave gets that far behind, it is easier and faster to restore last nights master backup and edit the master.info file on the slave to point to todays log file. Luis Mediero wrote: Hi, I would like write a script to purge every ni

Re: Script for Database[MySQL]::Web interfacing

2003-08-28 Thread Cybot
Joseph Maxwell wrote: Hello, Could someone recommend a decent php script that could be used for database[MySQL]::Web interfacing and management. Preferably open source, freeware or otherwise [I'll just have to grin & bare it] phpMyAdmin -> www.phpmyadmin.net -- Sebastian Mendel www.sebastianmend

RE: script

2002-11-26 Thread Adolfo Bello
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Monday, November 25, 2002 9:51 AM > To: Mysql maillist > Subject: script > > > Hi All. > I have written a SQL script that should retrieve all the rows from a > table that match a value given as parameter

Re: script for complete Database dump?

2002-09-05 Thread nick gatsis
I suggest you to copy the database files. If you are the administrator in a Linux system make a cron once (for example) a week to copy this files to somwere else. --- Kai Vermehr <[EMAIL PROTECTED]> &eacgr;&ggr;&rgr;&agr;&psgr;&egr;: > is there any single MySQL script that would backup > my co

Re: script for complete Database dump?

2002-09-03 Thread Egor Egorov
Kai, Tuesday, September 03, 2002, 3:09:45 PM, you wrote: KV> is there any single MySQL script that would backup my complete database? What about mysqldump? http://www.mysql.com/doc/en/mysqldump.html -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This emai

RE: script for complete Database dump?

2002-09-03 Thread Ben Joyce
use mySQLdump. c:\mysql\bin\mysqldump.exe there is a switch for dumping the whole DB. heh, .b > -Original Message- > From: Kai Vermehr [mailto:[EMAIL PROTECTED]] > Sent: 03 September 2002 13:10 > To: MySQL List > Subject: script for complete Database dump? > > > is there a

RE: script - full backup of mysql databases

2002-07-10 Thread Alok K. Dhir
Here's a trivial example. Run something like this out of cron every night. --- cut #!/bin/sh DATE=`/bin/date +%Y-%m-%d` mysqldump -u root -p [password] --all-databases --opt > \ /path/to/large/partition/backup_${DATE}.sql --- cut > -Original Message- > From: adi [mailto:[EMAIL

RE: Script for Data base backup and recovery : Very essential

2002-03-18 Thread adam nelson
system ("tar cfz $backupFile\-$szToday.tgz $siteDir"); -Original Message- From: Gerald R. Jensen [mailto:[EMAIL PROTECTED]] Sent: Friday, March 15, 2002 9:49 PM To: Chetan Lavti; [EMAIL PROTECTED] Subject: Re: Script for Data base backup and recovery : Very essential This has b

Re: Script for Data base backup and recovery : Very essential

2002-03-15 Thread Gerald R. Jensen
This has been covered here a number of times before ... a search of the archive avoids the need to repeat the same info. That being said ... We use a cronjob (root) that calls a shell script at 3am daily. The line in the cronjob is: * 3 * * * /usr/local/bin/dbbakup.sh username password The she

Re: Script (Linux 7.1)

2002-02-23 Thread Doug Thompson
One way is to include it in your mysql start command: mysql -u user -ppassword hi, >I have written a script for database creation and table creation. Now I >want to run this script from the MySQL prompt. How can I do this..? >Please , anybody know about this , so that I can create my database by