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
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
- 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
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
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
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
- 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
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
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
>
> ---
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
>
>
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
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
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
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
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->
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:
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:
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
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
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
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
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
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 -
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
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
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]>; "
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
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
.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
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
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
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
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
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
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
> -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
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
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
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
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
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
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
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
43 matches
Mail list logo