RE: a Linux -csh script to refresh test with production
well, you'd want to come up with your specifics but it's pretty simple using ssh... put this is your shell... $ mysqldump db-name | mysql -h remote.box.com db-name $ mysqldump db-name | ssh [EMAIL PROTECTED] mysql db-name $ mysqldump db-name foo | ssh [EMAIL PROTECTED] mysql bar hope this helps bb -Original Message- From: Brown, Charles [mailto:[EMAIL PROTECTED] Sent: Tue 3/27/2007 12:17 PM To: mysql@lists.mysql.com Subject: a Linux -csh script to refresh test with production Hello all. Does anyone out there (in mysql world) have a Linux -csh script to refresh test with production data. My developers would like their test database to be refreshed nightly with production data. The production and test mysql servers do not run in the same box. They run on different boxes. Therefore there is some ftp or scp required Thanks This message is intended only for the use of the Addressee and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please erase all copies of the message and its attachments and notify us immediately. Thank you. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: remove trailing character
try updating the table like this... update TABLE set COLUMN = replace(COLUMN, ,); -Original Message- From: Scott Haneda [mailto:[EMAIL PROTECTED] Sent: Thursday, March 10, 2005 3:30 PM To: MySql Subject: remove trailing character I managed to mess up and email storage addresses are in the format of [EMAIL PROTECTED] How I can strip off the , it does not exist on all, only some. thanks -- - Scott HanedaTel: 415.898.2602 http://www.newgeo.com Fax: 313.557.5052 [EMAIL PROTECTED] Novato, CA U.S.A. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Import Excel data into table
I think you mean that you want to import .txt or .csv data into an mysql table... http://phpmyadmin.net can do that via a web form to upload plus has many other good admin features. -Original Message- From: Steve Grosz [mailto:[EMAIL PROTECTED] Sent: Thursday, January 13, 2005 1:56 PM To: mysql@lists.mysql.com Subject: Import Excel data into table Can anyone tell me a good way to import individual column data into a table? Is there a tool to assist with this? Thanks, Steve -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: OUTFILE to CVS with headers
well, you can easily output into a comma separated file but the INTO OUTFILE option will not allow you to retain the headers. You will need to build the logic into a perl script or language of your choice to get the headers there. Sounds like your fields records are all on one line becausing you're not ending lines with a new line... try this. SELECT Fields FROM databasename WHERE (criteria) INTO OUTFILE 'pathtofile/filename.csv' FIELDS TERMINATED BY '\,' OPTIONALLY ENCLOSED BY '\' LINES TERMINATED BY '\n'; i hope this helps... -- From: Mike Koponick Sent: Thursday, June 24, 2004 5:51 PM To: [EMAIL PROTECTED] Subject: OUTFILE to CVS with headers Hello, I'm working on a project where I must export to a text file and the text file needs to be formed into columns so that it can be imported into a WORD mail merge document. So, the format of the output file has to have the headers for each column and the lines must have a CR at the end of each line in order to keep the columns formatted. Here is what I'm doing now: select created, status,user, comment1, comment7, comment8, trouble from tbl WHERE customer = 'customer' AND created BETWEEN '2004-05-31' AND '2004-06-25' ORDER BY created, status into outfile 'test5.txt' fields terminated by ',' optionally enclosed by '' escaped by '\\'; All the lines run together so it makes it impossible to import. Thanks in advance for your help. Mike This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Please report errors to [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: OS X 10.3.3 and byte ordering update
i did the update to 10.3.3 (client) yesterday without a hitch. it's probably a good idea to do a backup anyways. -- From: Scott Haneda Sent: Tuesday, March 16, 2004 6:21 PM To: MySql Subject: OS X 10.3.3 and byte ordering update I saw a little blip about issues with MySql when updateing OS X to 10.3.3. It seems the byte order has changed and you will have to export and import all your data. I got the impression this only applies to OS X Server, and not client, so only the MySql installed by Apple. Anyone have any more data on this, or is it safe to update to 10.3.3 on a OS X client machine? -- - Scott HanedaTel: 415.898.2602 http://www.newgeo.com Fax: 313.557.5052 [EMAIL PROTECTED]Novato, CA U.S.A. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Query INTO OUTFILE Problem
Hello MYSQL Genii, I am trying to run a query that returns results to a .csv file using mysql's 'INTO OUTFILE'. The problem is whenever I write the file I lose my the field names for each column. For example, when I run the query at command line mysql: mysql SELECT distinct count(*), Product FROM LIVE WHERE dbStatus = 'Live' and vertical = 'Cars' GROUP BY Product; I get this: +--+-+ | count(*) | Product | +--+-+ |4 | BANN| | 10 | CRBN| | 256 | LEAD| | 36 | SALE| | 26 | TRBN| +--+-+ 5 rows in set (0.20 sec) I want to have the titles of my columns (like above) in my .csv file... When I use the 'INTO OUTFILE' syntax I lose all of the titles and just get the data returned like this: 4,BANN 10,CRBN 256,LEAD 36,SALE 26,TRBN Is it possible to use INTO OUTFILE and still get my field names outputted? Here is the query $var I am using for perl or php. $query = SELECT distinct count(*), Product FROM LIVE WHERE dbStatus = 'Live' and vertical = 'Cars' GROUP BY Product INTO OUTFILE '/www/vhosts/someurl.org/htdocs/report_files/apts_mnth_unit.csv' FIELDS TERMINATED BY '\,' OPTIONALLY ENCLOSED BY '\' LINES TERMINATED BY '\n'; If anyone of you geeks, I mean genii, can assist, I would be happy to name my first born in your honor. TIA! \\\|/// \\ ~ ~ // (/ @ @ /) +oOOo-(_)-oOOo--+ | Bob Bessares | | latimes.com | | 202 West 1st Street | | Los Angeles, CA 90012| | Phone : (213) 473-2505 | | Fax : (213) 473-2438 | | e-mail: [EMAIL PROTECTED] | +---+ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]