LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-19-2012, 12:31 PM   #16
piyush128k
Member
 
Registered: Jun 2012
Posts: 68

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled

There is a change in the scenario after running the first trial.
My diff portion that i was trying to achieve is still there and is suppose to be for the user names.
the other portion is decried below.

Server A
1. has my "diff" bash script (diff is the name of my script)
2. we login using mysql user id "xyz" for the mysqldb from the script
3. no mysql db exist here
4. querydb file not generated here so when we look in /tmp we see the other two instead
5. "userlist" generated here
6. "final" file generated here

Server B
1. does not have bash script
2. has mysqldb
3. the file is not created here as well because the mysql user id "xyz" does not have permission on any files and folders on this server
4. userlist file is not generated here
5. final file is not generated here


the querydb file is to be created on Server A. nothing to be created on the database server
 
Old 10-19-2012, 12:34 PM   #17
piyush128k
Member
 
Registered: Jun 2012
Posts: 68

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
this portion:-

CMD="show databases; use metadata; show tables; select * from usernames; select * from personaldata; describe usernames; describe personaldata; select usernames.SNo, usernames.DataTelid, usernames.UName, personaldata.ActiveInactive from usernames, personaldata where usernames.DataTelid=personaldata.DataTelid into outfile '/tmp/querydb';"

the above portion is not creating the file on server B because the new user id we created in the m,yhsql database does not have any sort of permission to create anything in the files or folder of that server B. We want the above query on server A. What modification do i have to do. Where will i insert the ssh command.

The scenario is very confusing but that is the environment i have the restrictions. Nothing is to be created on the Server B and I cannot execute the script on Serve B. Help
 
Old 10-22-2012, 08:17 AM   #18
piyush128k
Member
 
Registered: Jun 2012
Posts: 68

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
no response?
 
Old 10-22-2012, 09:41 AM   #19
piyush128k
Member
 
Registered: Jun 2012
Posts: 68

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
@jschiwal please let me know what you think of my situation. am not sure why I am not getting any response
 
Old 10-22-2012, 06:25 PM   #20
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
1. you need to enable a remote mysql cxn/login to B from A
http://www.cyberciti.biz/tips/how-do...se-server.html

2. its simpler if you put the sql cmds in a file and call it thus https://dev.mysql.com/doc/refman/5.0...-commands.html, inserting user, passwd, host on the cli as per (1.).

PS: this is a purely volunteer site; we answer which qns we want to, when we want to.
If you have serious time issues, you should find a company that offers paid support.

Last edited by chrism01; 10-22-2012 at 06:26 PM.
 
Old 10-23-2012, 10:56 AM   #21
piyush128k
Member
 
Registered: Jun 2012
Posts: 68

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Can someone break this down for me. I am searching it further as well. diff filename 1 filename2 | grep '^[<>]' | sed "s/^> (.*)/\1 some string/;"
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl Script to count files and directories is not working. user_28 Programming 15 08-29-2010 07:35 PM
Script to isolate files with 1 instance of each of 4 diff. words (grep) kmkocot Linux - Newbie 3 08-24-2009 08:54 AM
diff files elainelaw Linux - Software 2 07-23-2009 05:52 AM
diff two files noir911 Linux - Server 3 03-25-2009 05:00 PM
is it possible to diff ps files? markhod Linux - General 8 09-05-2005 12:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration