| |
|
If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
|
 |

09-28-05, 10:53
|
|
Registered User
|
|
Join Date: May 2004
Posts: 86
|
|
|
mysqldump problem
|
|
i have a .bat file that writes my record to a csv file. works fine in windows, but in linux it writes a file but theirs no data in it???
/usr/bin/mysqldump -h localhost -u root --tab--fields-terminated-by=';'
--lines-terminated-by="\n" --no-create-info ehpadmin Referral_Authorization > Referral.txt
am i misssing a bracket or something new to linux....???
thanks for the help
|
|

09-28-05, 16:36
|
|
Registered User
|
|
Join Date: Oct 2002
Location: greenwich.ct.us
Posts: 279
|
|
looks OK to me. Any error messages?
|
|

09-29-05, 09:10
|
|
Registered User
|
|
Join Date: May 2004
Posts: 86
|
|
|
Well no
|
|
I dont get no error messages. below is my whole script it does everything but the writting to a file. it writes a file but theirs no data in it??? Something not confiqured right? i am the su- on my machine i have full writes to my table. DOnt get it??? Someone save me
#!/bin/bash
/usr/bin/mysql -h localhost -u root ehpadmin < /usr/etc/scripts/script.sql
/usr/bin/mysqldump -h localhost -u root ehpadmin > backup.txt
/usr/bin/mysqldump -h localhost -u root --tab--fields-terminated-by=';'
--lines-terminated-by="\n" --no-create-info ehpadmin Referral_Authorization > Referral.txt
/usr/bin/mysql -h localhost -u root ehpadmin < /usr/etc/scripts/truncate.sql
|
|

09-29-05, 10:04
|
|
Registered User
|
|
Join Date: Apr 2005
Location: Lier, Belgium
Posts: 122
|
|
Quote:
|
Originally Posted by petenyce105
it writes a file but theirs no data in it??? Something not confiqured right?
|
Are you sure it isn't a password issue?
--
felix
|
|

09-29-05, 10:10
|
|
Registered User
|
|
Join Date: May 2004
Posts: 86
|
|
|
ok heres my file
i have basic set up root with no password
below is what my file outputs. very stange. why is it showing me all this garbage? i just want the data not server version or lock or nothing..... do i have to many privildges set???
-- MySQL dump 10.9
--
-- Host: localhost Database: ehpadmin
-- ------------------------------------------------------
-- Server version 4.1.11
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Dumping data for table `Referral_Authorization`
--
/*!40000 ALTER TABLE `Referral_Authorization` DISABLE KEYS */;
LOCK TABLES `Referral_Authorization` WRITE;
INSERT INTO `Referral_Authorization` VALUES ('MOMC8779394','AMAYA, JANNETH','F','19781203','11016 KITTRIDGE ST APT 1','N HOLLYWOOD','CA','91606','8187865951','MOMCG000','S ','S','','','','RETROACTIVE','20050605','YES','MAR K','AMICO','8187270142','8188855480','PHYSICIAN',' ','','GERBERG, ERWIN','PO BOX 190','SIMI VALLEY','CA','93062','8002876838','','RADIOLOGY',' ','','PREGNANCY CARE','','','','','','','','','','F','','','','F', 'THURSDAY, 9/29/2005','','PETE@WEST.COM','E01PRF059V000900','PETE' ,'953864875','A');
UNLOCK TABLES;
/*!40000 ALTER TABLE `Referral_Authorization` ENABLE KEYS */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
|

09-29-05, 10:19
|
|
Registered User
|
|
Join Date: Apr 2005
Location: Lier, Belgium
Posts: 122
|
|
Quote:
|
Originally Posted by petenyce105
below is what my file outputs. very stange. why is it showing me all this garbage?
...Useful mysqldump output snipped ...
|
Before you said you didn't get any output.
This isn't garbage - it is useful info so the file can be used with the mysql command in a restore operation.
Look into the --compact and --no-create-info options of mysqldump
--
felix
|
|

09-29-05, 10:34
|
|
Registered User
|
|
Join Date: May 2004
Posts: 86
|
|
|
ok but
I dont understand why im getting all this extra commands. if you look below you will see my windows output and my linux output. very different. DO i have the wrong privildges set???? write to file?? im new and thanks for all the help. just dont understand it. i have a execustable that works ...
in windows using the same script i get
MOMC0394651;MANOKIAN GHARGH, ARSINEH;F;19830811;26 RIBVERA PKY;BURBANK;CA;91501;8182609474;MOMCG000;RADICULAR CYST;5228;;;;RETROACTIVE;20050823;YES;KATHY;CAIRO; 8187270142;8188855480;PHYSICIAN;;;ADVANCE RAD OF;
in linux using same script i get
-- MySQL dump 10.9
--
-- Host: localhost Database: ehpadmin
-- ------------------------------------------------------
-- Server version 4.1.11
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Dumping data for table `Referral_Authorization`
--
/*!40000 ALTER TABLE `Referral_Authorization` DISABLE KEYS */;
LOCK TABLES `Referral_Authorization` WRITE;
INSERT INTO `Referral_Authorization` VALUES ('MOMC8779394','AMAYA, JANNETH','F','19781203','11016 KITTRIDGE ST APT 1','N HOLLYWOOD','CA','91606','8187865951','MOMCG000','S ','S','','','','RETROACTIVE','20050605','YES','MAR K','AMICO','8187270142','8188855480','PHYSICIAN',' ','','GERBERG, ERWIN','PO BOX 190','SIMI VALLEY','CA','93062','8002876838','','RADIOLOGY',' ','','PREGNANCY CARE','','','','','','','','','','F','','','','F', 'THURSDAY, 9/29/2005','','PETE@WEST.COM','E01PRF059V000900','PETE' ,'953864875','A');
UNLOCK TABLES;
/*!40000 ALTER TABLE `Referral_Authorization` ENABLE KEYS */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
|

09-29-05, 12:24
|
|
Registered User
|
|
Join Date: Apr 2005
Location: Lier, Belgium
Posts: 122
|
|
Quote:
|
Originally Posted by petenyce105
MOMC0394651;MANOKIAN GHARGH, ARSINEH;F;19830811;26 RIBVERA PKY;BURBANK;CA;91501;8182609474;MOMCG000;RADICULAR CYST;5228;;;;RETROACTIVE;20050823;YES;KATHY;CAIRO; 8187270142;8188855480;PHYSICIAN;;;ADVANCE RAD OF;
|
Try this (on one line):
$ mysqldump -uroot --tab=. --fields-terminated-by=";" --lines-terminated-by="\n" --no-create-info ehpadmin Referral_Authorization
and look for the file Referral_Authorization.txt
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|