Mysql Event scheduler
Good day all Can anyone perhaps off hand tell me whether the following two tasks will be able to be scheduled with the MySQL event scheduler? 1. MySQL backups using mysqldump 2. Analyzing of tables (all tables for all databases) Regards Machiel
RE: export result from select statement
-Original Message- From: LAMP [mailto:l...@afan.net] Sent: Sunday, January 09, 2011 9:46 PM To: mysql@lists.mysql.com Subject: Re: export result from select statement maybe it's clear to other but it's pretty unclear. #mysql -username -p select * from table_name where id=123 '/home/me/test/test.txt' actually doesn't work?!? [JS] The command you wrote doesn't redirect the input of the client. It should read #mysql -username -pxxx dbname /home/me/testing/text.sql /home/me/testing/text.txt By the way, it is a bad idea to use test as a file or directory name. It is very easy to accidentally invoke the test command, which can really make you scratch your head. Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 E-mail: je...@gii.co.jp Web site: www.the-infoshop.com Jerry Schwartz wrote: The technique I've settled on is this: mysql blah blah blah the_select_query.sql the_output_i_want.txt That gives you a tab-delimited text file with column headings. Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 E-mail: je...@gii.co.jp Web site: www.the-infoshop.com -Original Message- From: LAMP [mailto:l...@afan.net] Sent: Saturday, January 08, 2011 6:05 PM To: mysql@lists.mysql.com Subject: export result from select statement Hi guys, I wonder how to store to csv or txt file result from SELECT query? not a whole table nor database. Just results from SELECT query. Usually I use MySQL Query Browser and Export feature, but in this case I don't have access with MySQL Query Browser. Though, I have a command line access. I found on one place something like #SELECT 2+2 into outfile '/path/to/specific/directory/test.csv'; Though, it doesn't work?!? Thanks. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=je...@gii.co.jp -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
RE: export result from select statement
-Original Message- From: Michael Dykman [mailto:mdyk...@gmail.com] Sent: Sunday, January 09, 2011 3:02 PM To: LAMP; mysql@lists.mysql.com Subject: Re: export result from select statement I second Jerry's recommendation. It always works like a charm for me. [JS] Thanks. By the way, if your SELECT is easy to type you can use the -e parameter on the MySQL command line. Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 E-mail: je...@gii.co.jp Web site: www.the-infoshop.com - michael dykman On Sun, Jan 9, 2011 at 2:44 PM, Jerry Schwartz je...@gii.co.jp wrote: The technique I've settled on is this: mysql blah blah blah the_select_query.sql the_output_i_want.txt That gives you a tab-delimited text file with column headings. Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 E-mail: je...@gii.co.jp Web site: www.the-infoshop.com -Original Message- From: LAMP [mailto:l...@afan.net] Sent: Saturday, January 08, 2011 6:05 PM To: mysql@lists.mysql.com Subject: export result from select statement Hi guys, I wonder how to store to csv or txt file result from SELECT query? not a whole table nor database. Just results from SELECT query. Usually I use MySQL Query Browser and Export feature, but in this case I don't have access with MySQL Query Browser. Though, I have a command line access. I found on one place something like #SELECT 2+2 into outfile '/path/to/specific/directory/test.csv'; Though, it doesn't work?!? Thanks. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=je...@gii.co.jp -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=mdyk...@gmail.com -- - michael dykman - mdyk...@gmail.com May the Source be with you. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=je...@gii.co.jp -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
RE: Reading .MYD file of Mysql Tables
In reality, you better off manipulating the MyISAM tables via SQL. However, if you really are that adventurous about low-level reads of MyISAM tables, I have a crazy suggestion for you !!! The old MySQL book used as reference to MySQL 3.23/4.0 describes manipulating a MyISAM table with an API that reminds me so much of manipulating DBF files via the DBASE/Clipper/FoxPro programming language. The book is called MySQL Reference Manual (ISBN 0-596-00265-3 ,Published June 2002) http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Dstripbooksfield-keywords=0-596-00265-3 It was Chapter 6, pages 512,513 Section 6.4.2 HANDLER Syntax. This same information appears at the following URLs: http://dev.mysql.com/doc/refman/5.5/en/handler.html http://download.oracle.com/docs/cd/E17952_01/refman-5.0-en/handler.html Keep mind that this is a read-only MyISAM API. No low-level writes are available with that API. If you need to edit the MyISAM table structure, you should definitely used ALTER TABLE. However, if you really are that adventurous about table structure manipulation of MyISAM tables, I have a crazy suggestion for you !!! A more recent book, called High Performance MySQL, Second Edition (ISBN 0-0596-10171-8, Published June 2008) http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Dstripbooksfield-keywords=0-596-10171-8 has a section Speeding up ALTER TABLE on Pages 146-149 on how to doctor the .MYI file to add new columns and the gotchas in doing it that way. If you want to writes and updated to column data in a MyISAM table, I have no crazy suggestions except one : Download the C source code for the MyISAM storage engine, study it, and have fun with it. If you just need faster write performance on MyISAM tables, use one or both of the following: 1) INSERT DELAYED for a single row (be prepared to suffer up to one second of data loss in the event of a crash) 2) LOAD DATA INFILE for bulk loading of data (please set bulk_insert_buffer_size to something like 512M) 3) More suggestions at http://kevin.vanzonneveld.net/techblog/article/improve_mysql_insert_performance/ I hope these ramblings of mine helped. Please write back to the MySQL Lists and let us all know what you tried and if it worked. Have a good day !!! Rolando A. Edwards MySQL DBA (SCMDBA) 155 Avenue of the Americas, Fifth Floor New York, NY 10013 212-625-5307 (Work) 201-660-3221 (Cell) AIM Skype : RolandoLogicWorx redwa...@logicworks.net http://www.linkedin.com/in/rolandoedwards -Original Message- From: Adarsh Sharma [mailto:adarsh.sha...@orkash.com] Sent: Sunday, January 09, 2011 11:14 PM To: mysql@lists.mysql.com Subject: Reading .MYD file of Mysql Tables Dear all, I am facing a issue which should be resolved by editing .MYD file of a Table. I know there are 3 files foe a MyISAM table in Mysql but i want to read and edit some changes in .MYD file. If it is possible , Can anyone PLease tell me the way to do this. Thanks Regards Adarsh Sharma -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=redwa...@logicworks.net -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
RE: Mysql Event scheduler
1. no 2. yes -Original Message- From: Machiel Richards [mailto:machi...@rdc.co.za] Sent: Monday, January 10, 2011 2:07 AM To: mysql mailing list Subject: Mysql Event scheduler Good day all Can anyone perhaps off hand tell me whether the following two tasks will be able to be scheduled with the MySQL event scheduler? 1. MySQL backups using mysqldump 2. Analyzing of tables (all tables for all databases) Regards Machiel IMPORTANT: This email message is intended only for the use of the individual to whom, or entity to which, it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are NOT the intended recipient, you are hereby notified that any use, dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please reply to the sender immediately and permanently delete this email. Thank you.
how to generate a data set then join with in on fly?
Hi, In MySQL, is that possible to generate a data set join with it on fly (without create an temporary table)? e.g. for a report used by a graphic tool, it requires data in all dates, even it is null. Can I select vacationT.* left join ( all dates d in the past 3 years) on vacationT.`date` = d ? Thanks, Ryan